Home | History | Annotate | Download | only in mac
      1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_MAC_INSTALL_FROM_DMG_H_
      6 #define CHROME_BROWSER_MAC_INSTALL_FROM_DMG_H_
      7 
      8 #include <string>
      9 
     10 // If the application is running from a read-only disk image, prompts the user
     11 // to install it to the hard drive.  If the user approves, the application
     12 // will be installed and launched, and MaybeInstallFromDiskImage will return
     13 // true.  In that case, the caller must exit expeditiously.
     14 bool MaybeInstallFromDiskImage();
     15 
     16 // Given a BSD device name of the form "diskN" or "diskNsM" as used by IOKit,
     17 // where the device name corresponds to a disk image, unmounts all filesystems
     18 // on that disk image ("diskN", even if "diskNsM" was supplied), "ejects" the
     19 // disk image from the system, and places the disk image file into the Trash.
     20 // If at any step an error occurs, further processing is aborted.
     21 void EjectAndTrashDiskImage(const std::string& dmg_bsd_device_name);
     22 
     23 #endif  // CHROME_BROWSER_MAC_INSTALL_FROM_DMG_H_
     24