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

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

Issue 14761012: Updated SessionManagerClient to use the multi-profile user policy calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #include "chrome/common/chrome_notification_types.h" 89 #include "chrome/common/chrome_notification_types.h"
90 #include "chrome/common/chrome_paths.h" 90 #include "chrome/common/chrome_paths.h"
91 #include "chrome/common/chrome_switches.h" 91 #include "chrome/common/chrome_switches.h"
92 #include "chrome/common/chrome_version_info.h" 92 #include "chrome/common/chrome_version_info.h"
93 #include "chrome/common/logging_chrome.h" 93 #include "chrome/common/logging_chrome.h"
94 #include "chrome/common/pref_names.h" 94 #include "chrome/common/pref_names.h"
95 #include "chromeos/audio/audio_devices_pref_handler.h" 95 #include "chromeos/audio/audio_devices_pref_handler.h"
96 #include "chromeos/audio/audio_pref_handler.h" 96 #include "chromeos/audio/audio_pref_handler.h"
97 #include "chromeos/audio/cras_audio_handler.h" 97 #include "chromeos/audio/cras_audio_handler.h"
98 #include "chromeos/audio/cras_audio_switch_handler.h" 98 #include "chromeos/audio/cras_audio_switch_handler.h"
99 #include "chromeos/chromeos_paths.h"
99 #include "chromeos/chromeos_switches.h" 100 #include "chromeos/chromeos_switches.h"
100 #include "chromeos/cryptohome/async_method_caller.h" 101 #include "chromeos/cryptohome/async_method_caller.h"
101 #include "chromeos/cryptohome/cryptohome_library.h" 102 #include "chromeos/cryptohome/cryptohome_library.h"
102 #include "chromeos/dbus/dbus_thread_manager.h" 103 #include "chromeos/dbus/dbus_thread_manager.h"
103 #include "chromeos/dbus/power_manager_client.h" 104 #include "chromeos/dbus/power_manager_client.h"
104 #include "chromeos/dbus/session_manager_client.h" 105 #include "chromeos/dbus/session_manager_client.h"
105 #include "chromeos/disks/disk_mount_manager.h" 106 #include "chromeos/disks/disk_mount_manager.h"
106 #include "chromeos/ime/input_method_manager.h" 107 #include "chromeos/ime/input_method_manager.h"
107 #include "chromeos/ime/xkeyboard.h" 108 #include "chromeos/ime/xkeyboard.h"
108 #include "chromeos/login/login_state.h" 109 #include "chromeos/login/login_state.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 explicit DBusServices(const content::MainFunctionParams& parameters) 295 explicit DBusServices(const content::MainFunctionParams& parameters)
295 : cros_initialized_(false) { 296 : cros_initialized_(false) {
296 // Initialize CrosLibrary only for the browser, unless running tests 297 // Initialize CrosLibrary only for the browser, unless running tests
297 // (which do their own CrosLibrary setup). 298 // (which do their own CrosLibrary setup).
298 if (!parameters.ui_task) { 299 if (!parameters.ui_task) {
299 const bool use_stub = !base::chromeos::IsRunningOnChromeOS(); 300 const bool use_stub = !base::chromeos::IsRunningOnChromeOS();
300 CrosLibrary::Initialize(use_stub); 301 CrosLibrary::Initialize(use_stub);
301 cros_initialized_ = true; 302 cros_initialized_ = true;
302 } 303 }
303 304
305 if (!base::chromeos::IsRunningOnChromeOS()) {
306 // Override this path on the desktop, so that the user policy key can be
307 // stored by the stub SessionManagerClient.
308 base::FilePath user_data_dir;
309 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
310 PathService::Override(chromeos::DIR_USER_POLICY_KEYS,
311 user_data_dir.AppendASCII("stub_user_policy"));
312 }
313 }
314
304 // Initialize DBusThreadManager for the browser. This must be done after 315 // Initialize DBusThreadManager for the browser. This must be done after
305 // the main message loop is started, as it uses the message loop. 316 // the main message loop is started, as it uses the message loop.
306 DBusThreadManager::Initialize(); 317 DBusThreadManager::Initialize();
307 CrosDBusService::Initialize(); 318 CrosDBusService::Initialize();
308 319
309 LoginState::Initialize(); 320 LoginState::Initialize();
310 CertLoader::Initialize(); 321 CertLoader::Initialize();
311 CertLibrary::Initialize(); 322 CertLibrary::Initialize();
312 CryptohomeLibrary::Initialize(); 323 CryptohomeLibrary::Initialize();
313 324
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 914 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
904 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 915 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
905 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 916 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
906 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 917 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
907 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 918 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
908 // This is necessary to start the experiment as a side effect. 919 // This is necessary to start the experiment as a side effect.
909 trial->group(); 920 trial->group();
910 } 921 }
911 922
912 } // namespace chromeos 923 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698