OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // framework's path or the initial app's path, which may be an app mode shim | 157 // framework's path or the initial app's path, which may be an app mode shim |
158 // or a unit test.) | 158 // or a unit test.) |
159 FilePath appBundlePath = | 159 FilePath appBundlePath = |
160 chrome::GetVersionedDirectory().DirName().DirName().DirName(); | 160 chrome::GetVersionedDirectory().DirName().DirName().DirName(); |
161 CFPreferencesSetAppValue( | 161 CFPreferencesSetAppValue( |
162 base::mac::NSToCFCast(app_mode::kLastRunAppBundlePathPrefsKey), | 162 base::mac::NSToCFCast(app_mode::kLastRunAppBundlePathPrefsKey), |
163 base::SysUTF8ToCFStringRef(appBundlePath.value()), | 163 base::SysUTF8ToCFStringRef(appBundlePath.value()), |
164 BaseBundleID_CFString()); | 164 BaseBundleID_CFString()); |
165 | 165 |
166 // Sync after a delay avoid I/O contention on startup; 1500 ms is plenty. | 166 // Sync after a delay avoid I/O contention on startup; 1500 ms is plenty. |
167 BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE, | 167 BrowserThread::PostDelayedTask( |
168 base::Bind(&PrefsSyncCallback), 1500); | 168 BrowserThread::FILE, FROM_HERE, |
| 169 base::Bind(&PrefsSyncCallback), |
| 170 base::TimeDelta::FromMilliseconds(1500)); |
169 } | 171 } |
170 | 172 |
171 } // anonymous namespace | 173 } // anonymous namespace |
172 | 174 |
173 const AEEventClass kAECloudPrintInstallClass = 'GCPi'; | 175 const AEEventClass kAECloudPrintInstallClass = 'GCPi'; |
174 const AEEventClass kAECloudPrintUninstallClass = 'GCPu'; | 176 const AEEventClass kAECloudPrintUninstallClass = 'GCPu'; |
175 | 177 |
176 @interface AppController (Private) | 178 @interface AppController (Private) |
177 - (void)initMenuState; | 179 - (void)initMenuState; |
178 - (void)initProfileMenu; | 180 - (void)initProfileMenu; |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 | 1319 |
1318 } // namespace browser | 1320 } // namespace browser |
1319 | 1321 |
1320 namespace app_controller_mac { | 1322 namespace app_controller_mac { |
1321 | 1323 |
1322 bool IsOpeningNewWindow() { | 1324 bool IsOpeningNewWindow() { |
1323 return g_is_opening_new_window; | 1325 return g_is_opening_new_window; |
1324 } | 1326 } |
1325 | 1327 |
1326 } // namespace app_controller_mac | 1328 } // namespace app_controller_mac |
OLD | NEW |