Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: chrome/browser/chrome_browser_main_mac.mm

Issue 16703025: [StorageMonitor] Move StorageMonitor ownership to BrowserProcessImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Catch up to SystemInfoStorage eject test Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main_mac.h ('k') | chrome/browser/chrome_browser_main_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/chrome_browser_main_mac.h" 5 #include "chrome/browser/chrome_browser_main_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <sys/sysctl.h> 8 #include <sys/sysctl.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/mac/bundle_locations.h" 12 #include "base/mac/bundle_locations.h"
13 #include "base/mac/mac_util.h" 13 #include "base/mac/mac_util.h"
14 #include "base/mac/scoped_nsobject.h" 14 #include "base/mac/scoped_nsobject.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "chrome/app/breakpad_mac.h" 17 #include "chrome/app/breakpad_mac.h"
18 #import "chrome/browser/app_controller_mac.h" 18 #import "chrome/browser/app_controller_mac.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #import "chrome/browser/chrome_browser_application_mac.h" 20 #import "chrome/browser/chrome_browser_application_mac.h"
21 #include "chrome/browser/mac/install_from_dmg.h" 21 #include "chrome/browser/mac/install_from_dmg.h"
22 #include "chrome/browser/mac/keychain_reauthorize.h" 22 #include "chrome/browser/mac/keychain_reauthorize.h"
23 #import "chrome/browser/mac/keystone_glue.h" 23 #import "chrome/browser/mac/keystone_glue.h"
24 #include "chrome/browser/metrics/metrics_service.h" 24 #include "chrome/browser/metrics/metrics_service.h"
25 #include "chrome/browser/storage_monitor/storage_monitor_mac.h"
26 #include "chrome/common/chrome_paths.h" 25 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
28 #include "content/public/common/main_function_params.h" 27 #include "content/public/common/main_function_params.h"
29 #include "content/public/common/result_codes.h" 28 #include "content/public/common/result_codes.h"
30 #include "ui/base/l10n/l10n_util_mac.h" 29 #include "ui/base/l10n/l10n_util_mac.h"
31 #include "ui/base/resource/resource_bundle.h" 30 #include "ui/base/resource/resource_bundle.h"
32 #include "ui/base/resource/resource_handle.h" 31 #include "ui/base/resource/resource_handle.h"
33 32
34 namespace { 33 namespace {
35 34
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 [nib instantiateNibWithOwner:NSApp topLevelObjects:nil]; 257 [nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
259 // Make sure the app controller has been created. 258 // Make sure the app controller has been created.
260 DCHECK([NSApp delegate]); 259 DCHECK([NSApp delegate]);
261 260
262 // Prevent Cocoa from turning command-line arguments into 261 // Prevent Cocoa from turning command-line arguments into
263 // |-application:openFiles:|, since we already handle them directly. 262 // |-application:openFiles:|, since we already handle them directly.
264 [[NSUserDefaults standardUserDefaults] 263 [[NSUserDefaults standardUserDefaults]
265 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; 264 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
266 } 265 }
267 266
268 void ChromeBrowserMainPartsMac::PreProfileInit() {
269 storage_monitor_.reset(new chrome::StorageMonitorMac());
270
271 ChromeBrowserMainPartsPosix::PreProfileInit();
272 }
273
274 void ChromeBrowserMainPartsMac::PostProfileInit() { 267 void ChromeBrowserMainPartsMac::PostProfileInit() {
275 ChromeBrowserMainPartsPosix::PostProfileInit(); 268 ChromeBrowserMainPartsPosix::PostProfileInit();
276 g_browser_process->metrics_service()->RecordBreakpadRegistration( 269 g_browser_process->metrics_service()->RecordBreakpadRegistration(
277 IsCrashReporterEnabled()); 270 IsCrashReporterEnabled());
278 } 271 }
279 272
280 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 273 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
281 AppController* appController = [NSApp delegate]; 274 AppController* appController = [NSApp delegate];
282 [appController didEndMainMessageLoop]; 275 [appController didEndMainMessageLoop];
283 } 276 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_mac.h ('k') | chrome/browser/chrome_browser_main_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698