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

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

Issue 10855244: Remove the --enable-device-policy and --enable-onc-policy flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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/existing_user_controller.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) 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/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 "base/bind.h" 10 #include "base/bind.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { 376 !parsed_command_line().HasSwitch(switches::kLoginPassword)) {
377 std::string username = 377 std::string username =
378 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); 378 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser);
379 VLOG(1) << "Relaunching browser for user: " << username; 379 VLOG(1) << "Relaunching browser for user: " << username;
380 chromeos::UserManager::Get()->UserLoggedIn(username, true); 380 chromeos::UserManager::Get()->UserLoggedIn(username, true);
381 381
382 // Redirects Chrome logging to the user data dir. 382 // Redirects Chrome logging to the user data dir.
383 logging::RedirectChromeLogging(parsed_command_line()); 383 logging::RedirectChromeLogging(parsed_command_line());
384 384
385 // Initialize user policy before creating the profile so the profile 385 // Initialize user policy before creating the profile so the profile
386 // initialization code sees policy settings. 386 // initialization code sees policy settings. Skip this for guest logins.
Mattias Nissler (ping if slow) 2012/08/23 11:37:51 nit: This comment adjustment doesn't make sense, I
Joao da Silva 2012/08/23 12:59:12 Done.
387 g_browser_process->browser_policy_connector()->InitializeUserPolicy( 387 if (!chromeos::UserManager::Get()->IsLoggedInAsGuest()) {
388 username, false /* wait_for_policy_fetch */); 388 g_browser_process->browser_policy_connector()->InitializeUserPolicy(
389 chromeos::UserManager::Get()->SessionStarted(); 389 username, false /* wait_for_policy_fetch */);
390 chromeos::UserManager::Get()->SessionStarted();
391 }
390 } 392 }
391 393
392 // In Aura builds this will initialize ash::Shell. 394 // In Aura builds this will initialize ash::Shell.
393 ChromeBrowserMainPartsLinux::PreProfileInit(); 395 ChromeBrowserMainPartsLinux::PreProfileInit();
394 } 396 }
395 397
396 void ChromeBrowserMainPartsChromeos::PostProfileInit() { 398 void ChromeBrowserMainPartsChromeos::PostProfileInit() {
397 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 399 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
398 // -- just after CreateProfile(). 400 // -- just after CreateProfile().
399 401
400 if (parsed_command_line().HasSwitch(switches::kLoginUser) && 402 if (parsed_command_line().HasSwitch(switches::kLoginUser) &&
401 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { 403 !parsed_command_line().HasSwitch(switches::kLoginPassword)) {
402 // Pass the TokenService pointer to the policy connector so user policy can 404 // Pass the TokenService pointer to the policy connector so user policy can
403 // grab a token and register with the policy server. 405 // grab a token and register with the policy server.
404 // TODO(mnissler): Remove once OAuth is the only authentication mechanism. 406 // TODO(mnissler): Remove once OAuth is the only authentication mechanism.
405 g_browser_process->browser_policy_connector()->SetUserPolicyTokenService( 407 g_browser_process->browser_policy_connector()->SetUserPolicyTokenService(
406 TokenServiceFactory::GetForProfile(profile())); 408 TokenServiceFactory::GetForProfile(profile()));
407 409
408 // Make sure we flip every profile to not share proxies if the user hasn't 410 // Make sure we flip every profile to not share proxies if the user hasn't
409 // specified so explicitly. 411 // specified so explicitly.
410 const PrefService::Preference* use_shared_proxies_pref = 412 const PrefService::Preference* use_shared_proxies_pref =
411 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); 413 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies);
412 if (use_shared_proxies_pref->IsDefaultValue()) 414 if (use_shared_proxies_pref->IsDefaultValue())
413 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); 415 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false);
414 } 416 }
415 417
416 if (parsed_command_line().HasSwitch(switches::kEnableONCPolicy)) { 418 network_config_updater_.reset(
417 network_config_updater_.reset( 419 new policy::NetworkConfigurationUpdater(
418 new policy::NetworkConfigurationUpdater( 420 g_browser_process->policy_service(),
419 g_browser_process->policy_service(), 421 chromeos::CrosLibrary::Get()->GetNetworkLibrary()));
420 chromeos::CrosLibrary::Get()->GetNetworkLibrary()));
421 }
422 422
423 // Make sure that wallpaper boot transition and other delays in OOBE 423 // Make sure that wallpaper boot transition and other delays in OOBE
424 // are disabled for tests by default. 424 // are disabled for tests by default.
425 // Individual tests may enable them if they want. 425 // Individual tests may enable them if they want.
426 if (parsed_command_line().HasSwitch(switches::kTestType)) 426 if (parsed_command_line().HasSwitch(switches::kTestType))
427 chromeos::WizardController::SetZeroDelays(); 427 chromeos::WizardController::SetZeroDelays();
428 428
429 // Tests should be able to tune login manager before showing it. 429 // Tests should be able to tune login manager before showing it.
430 // Thus only show login manager in normal (non-testing) mode. 430 // Thus only show login manager in normal (non-testing) mode.
431 if (!parameters().ui_task) 431 if (!parameters().ui_task)
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 LOG(WARNING) << "low_mem: Part of '100MB' experiment"; 588 LOG(WARNING) << "low_mem: Part of '100MB' experiment";
589 chromeos::LowMemoryObserver::SetLowMemoryMargin(100); 589 chromeos::LowMemoryObserver::SetLowMemoryMargin(100);
590 } else if (trial->group() == margin_200mb) { 590 } else if (trial->group() == margin_200mb) {
591 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; 591 LOG(WARNING) << "low_mem: Part of '200MB' experiment";
592 chromeos::LowMemoryObserver::SetLowMemoryMargin(200); 592 chromeos::LowMemoryObserver::SetLowMemoryMargin(200);
593 } else { 593 } else {
594 LOG(WARNING) << "low_mem: Part of 'default' experiment"; 594 LOG(WARNING) << "low_mem: Part of 'default' experiment";
595 } 595 }
596 } 596 }
597 } 597 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/existing_user_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698