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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 1140643002: Fix device_event_log component build, make NonThreadSafe (Take 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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.cc ('k') | components/device_event_log.gypi » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 #include "chromeos/dbus/session_manager_client.h" 102 #include "chromeos/dbus/session_manager_client.h"
103 #include "chromeos/disks/disk_mount_manager.h" 103 #include "chromeos/disks/disk_mount_manager.h"
104 #include "chromeos/login/login_state.h" 104 #include "chromeos/login/login_state.h"
105 #include "chromeos/login/user_names.h" 105 #include "chromeos/login/user_names.h"
106 #include "chromeos/login_event_recorder.h" 106 #include "chromeos/login_event_recorder.h"
107 #include "chromeos/network/network_change_notifier_chromeos.h" 107 #include "chromeos/network/network_change_notifier_chromeos.h"
108 #include "chromeos/network/network_change_notifier_factory_chromeos.h" 108 #include "chromeos/network/network_change_notifier_factory_chromeos.h"
109 #include "chromeos/network/network_handler.h" 109 #include "chromeos/network/network_handler.h"
110 #include "chromeos/system/statistics_provider.h" 110 #include "chromeos/system/statistics_provider.h"
111 #include "chromeos/tpm/tpm_token_loader.h" 111 #include "chromeos/tpm/tpm_token_loader.h"
112 #include "components/device_event_log/device_event_log.h"
112 #include "components/metrics/metrics_service.h" 113 #include "components/metrics/metrics_service.h"
113 #include "components/ownership/owner_key_util.h" 114 #include "components/ownership/owner_key_util.h"
114 #include "components/session_manager/core/session_manager.h" 115 #include "components/session_manager/core/session_manager.h"
115 #include "components/user_manager/user.h" 116 #include "components/user_manager/user.h"
116 #include "components/user_manager/user_manager.h" 117 #include "components/user_manager/user_manager.h"
117 #include "components/wallpaper/wallpaper_manager_base.h" 118 #include "components/wallpaper/wallpaper_manager_base.h"
118 #include "content/public/browser/browser_thread.h" 119 #include "content/public/browser/browser_thread.h"
119 #include "content/public/browser/notification_service.h" 120 #include "content/public/browser/notification_service.h"
120 #include "content/public/common/main_function_params.h" 121 #include "content/public/common/main_function_params.h"
121 #include "device/bluetooth/bluetooth_adapter_factory.h" 122 #include "device/bluetooth/bluetooth_adapter_factory.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() { 304 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() {
304 // Replace the default NetworkChangeNotifierFactory with ChromeOS specific 305 // Replace the default NetworkChangeNotifierFactory with ChromeOS specific
305 // implementation. This must be done before BrowserMainLoop calls 306 // implementation. This must be done before BrowserMainLoop calls
306 // net::NetworkChangeNotifier::Create() in MainMessageLoopStart(). 307 // net::NetworkChangeNotifier::Create() in MainMessageLoopStart().
307 net::NetworkChangeNotifier::SetFactory( 308 net::NetworkChangeNotifier::SetFactory(
308 new NetworkChangeNotifierFactoryChromeos()); 309 new NetworkChangeNotifierFactoryChromeos());
309 ChromeBrowserMainPartsLinux::PreMainMessageLoopStart(); 310 ChromeBrowserMainPartsLinux::PreMainMessageLoopStart();
310 } 311 }
311 312
312 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() { 313 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() {
314 // device_event_log must be initialized after the message loop.
315 device_event_log::Initialize(0 /* default max entries */);
316
313 base::FilePath user_data_dir; 317 base::FilePath user_data_dir;
314 if (!base::SysInfo::IsRunningOnChromeOS() && 318 if (!base::SysInfo::IsRunningOnChromeOS() &&
315 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { 319 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
316 // Override some paths with stub locations so that cloud policy and 320 // Override some paths with stub locations so that cloud policy and
317 // enterprise enrollment work on desktop builds, for ease of 321 // enterprise enrollment work on desktop builds, for ease of
318 // development. 322 // development.
319 chromeos::RegisterStubPathOverrides(user_data_dir); 323 chromeos::RegisterStubPathOverrides(user_data_dir);
320 } 324 }
321 325
322 dbus_services_.reset(new internal::DBusServices(parameters())); 326 dbus_services_.reset(new internal::DBusServices(parameters()));
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 // Destroy DBus services immediately after threads are stopped. 774 // Destroy DBus services immediately after threads are stopped.
771 dbus_services_.reset(); 775 dbus_services_.reset();
772 776
773 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 777 ChromeBrowserMainPartsLinux::PostDestroyThreads();
774 778
775 // Destroy DeviceSettingsService after g_browser_process. 779 // Destroy DeviceSettingsService after g_browser_process.
776 DeviceSettingsService::Shutdown(); 780 DeviceSettingsService::Shutdown();
777 } 781 }
778 782
779 } // namespace chromeos 783 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | components/device_event_log.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698