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

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

Issue 251703004: Do not set kGoogleServicesUsername for device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/kiosk_browsertest.cc » ('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 27 matching lines...) Expand all
38 #include "chrome/browser/chromeos/input_method/input_method_util.h" 38 #include "chrome/browser/chromeos/input_method/input_method_util.h"
39 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h" 39 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h"
40 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" 40 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h"
41 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 41 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
42 #include "chrome/browser/chromeos/language_preferences.h" 42 #include "chrome/browser/chromeos/language_preferences.h"
43 #include "chrome/browser/chromeos/login/authenticator.h" 43 #include "chrome/browser/chromeos/login/authenticator.h"
44 #include "chrome/browser/chromeos/login/login_utils.h" 44 #include "chrome/browser/chromeos/login/login_utils.h"
45 #include "chrome/browser/chromeos/login/login_wizard.h" 45 #include "chrome/browser/chromeos/login/login_wizard.h"
46 #include "chrome/browser/chromeos/login/screen_locker.h" 46 #include "chrome/browser/chromeos/login/screen_locker.h"
47 #include "chrome/browser/chromeos/login/startup_utils.h" 47 #include "chrome/browser/chromeos/login/startup_utils.h"
48 #include "chrome/browser/chromeos/login/user.h"
48 #include "chrome/browser/chromeos/login/user_manager.h" 49 #include "chrome/browser/chromeos/login/user_manager.h"
49 #include "chrome/browser/chromeos/login/wallpaper_manager.h" 50 #include "chrome/browser/chromeos/login/wallpaper_manager.h"
50 #include "chrome/browser/chromeos/login/wizard_controller.h" 51 #include "chrome/browser/chromeos/login/wizard_controller.h"
51 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" 52 #include "chrome/browser/chromeos/memory/oom_priority_manager.h"
52 #include "chrome/browser/chromeos/net/network_portal_detector.h" 53 #include "chrome/browser/chromeos/net/network_portal_detector.h"
53 #include "chrome/browser/chromeos/options/cert_library.h" 54 #include "chrome/browser/chromeos/options/cert_library.h"
54 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 55 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
56 #include "chrome/browser/chromeos/policy/device_local_account.h"
55 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" 57 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h"
56 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" 58 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h"
57 #include "chrome/browser/chromeos/power/power_button_observer.h" 59 #include "chrome/browser/chromeos/power/power_button_observer.h"
58 #include "chrome/browser/chromeos/power/power_data_collector.h" 60 #include "chrome/browser/chromeos/power/power_data_collector.h"
59 #include "chrome/browser/chromeos/power/power_prefs.h" 61 #include "chrome/browser/chromeos/power/power_prefs.h"
60 #include "chrome/browser/chromeos/profiles/profile_helper.h" 62 #include "chrome/browser/chromeos/profiles/profile_helper.h"
61 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " 63 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h "
62 #include "chrome/browser/chromeos/settings/device_settings_service.h" 64 #include "chrome/browser/chromeos/settings/device_settings_service.h"
63 #include "chrome/browser/chromeos/settings/owner_key_util.h" 65 #include "chrome/browser/chromeos/settings/owner_key_util.h"
64 #include "chrome/browser/chromeos/status/data_promo_notification.h" 66 #include "chrome/browser/chromeos/status/data_promo_notification.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 false, // has_cookies 158 false, // has_cookies
157 true, // has_active_session 159 true, // has_active_session
158 this); 160 this);
159 } else { 161 } else {
160 delete this; 162 delete this;
161 } 163 }
162 } 164 }
163 165
164 // LoginUtils::Delegate implementation: 166 // LoginUtils::Delegate implementation:
165 virtual void OnProfilePrepared(Profile* profile) OVERRIDE { 167 virtual void OnProfilePrepared(Profile* profile) OVERRIDE {
166 std::string login_user = 168 const std::string login_user =
167 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 169 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
168 chromeos::switches::kLoginUser); 170 chromeos::switches::kLoginUser);
169 profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername, login_user); 171 if (!policy::IsDeviceLocalAccountUser(login_user, NULL)) {
172 profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
173 login_user);
174 }
170 profile_prepared_ = true; 175 profile_prepared_ = true;
171 LoginUtils::Get()->DoBrowserLaunch(profile, NULL); 176 LoginUtils::Get()->DoBrowserLaunch(profile, NULL);
172 delete this; 177 delete this;
173 } 178 }
174 179
175 scoped_refptr<Authenticator> authenticator_; 180 scoped_refptr<Authenticator> authenticator_;
176 bool profile_prepared_; 181 bool profile_prepared_;
177 }; 182 };
178 183
179 bool ShouldAutoLaunchKioskApp(const CommandLine& command_line) { 184 bool ShouldAutoLaunchKioskApp(const CommandLine& command_line) {
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 // Destroy DBus services immediately after threads are stopped. 837 // Destroy DBus services immediately after threads are stopped.
833 dbus_services_.reset(); 838 dbus_services_.reset();
834 839
835 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 840 ChromeBrowserMainPartsLinux::PostDestroyThreads();
836 841
837 // Destroy DeviceSettingsService after g_browser_process. 842 // Destroy DeviceSettingsService after g_browser_process.
838 DeviceSettingsService::Shutdown(); 843 DeviceSettingsService::Shutdown();
839 } 844 }
840 845
841 } // namespace chromeos 846 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/kiosk_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698