Chromium Code Reviews| Index: chrome/browser/app_controller_mac.mm |
| diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm |
| index b2d30cd729b218d5ba29660d95841d367c9cfb2e..936d1966271b41554a3a956491e6dd042d9b8576 100644 |
| --- a/chrome/browser/app_controller_mac.mm |
| +++ b/chrome/browser/app_controller_mac.mm |
| @@ -165,6 +165,8 @@ void RecordLastRunAppBundlePath() { |
| // real, user-visible app bundle directory. (The alternatives give either the |
| // framework's path or the initial app's path, which may be an app mode shim |
| // or a unit test.) |
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| + |
| base::FilePath appBundlePath = |
| chrome::GetVersionedDirectory().DirName().DirName().DirName(); |
|
tapted
2013/08/22 23:28:04
drive-by: Is there an issue down the code path
Ge
|
| CFPreferencesSetAppValue( |
| @@ -172,11 +174,7 @@ void RecordLastRunAppBundlePath() { |
| base::SysUTF8ToCFStringRef(appBundlePath.value()), |
| BaseBundleID_CFString()); |
| - // Sync after a delay avoid I/O contention on startup; 1500 ms is plenty. |
| - BrowserThread::PostDelayedTask( |
| - BrowserThread::FILE, FROM_HERE, |
| - base::Bind(&PrefsSyncCallback), |
| - base::TimeDelta::FromMilliseconds(1500)); |
| + PrefsSyncCallback(); |
| } |
| } // anonymous namespace |
| @@ -671,8 +669,12 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
| [NSApp setHelpMenu:helpMenu_]; |
| // Record the path to the (browser) app bundle; this is used by the app mode |
| - // shim. |
| - RecordLastRunAppBundlePath(); |
| + // shim. Sync after a delay avoid I/O contention on startup; 1500 ms is |
| + // plenty. |
| + BrowserThread::PostDelayedTask( |
| + BrowserThread::FILE, FROM_HERE, |
| + base::Bind(&RecordLastRunAppBundlePath), |
| + base::TimeDelta::FromMilliseconds(1500)); |
| // Makes "Services" menu items available. |
| [self registerServicesMenuTypesTo:[notify object]]; |