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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 10383114: Rename BrowserInit to StartupBrowserCreator, and move into startup subdir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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) 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/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "chrome/browser/prefs/pref_member.h" 51 #include "chrome/browser/prefs/pref_member.h"
52 #include "chrome/browser/prefs/pref_service.h" 52 #include "chrome/browser/prefs/pref_service.h"
53 #include "chrome/browser/profiles/profile.h" 53 #include "chrome/browser/profiles/profile.h"
54 #include "chrome/browser/profiles/profile_manager.h" 54 #include "chrome/browser/profiles/profile_manager.h"
55 #include "chrome/browser/signin/signin_manager.h" 55 #include "chrome/browser/signin/signin_manager.h"
56 #include "chrome/browser/signin/signin_manager_factory.h" 56 #include "chrome/browser/signin/signin_manager_factory.h"
57 #include "chrome/browser/signin/token_service.h" 57 #include "chrome/browser/signin/token_service.h"
58 #include "chrome/browser/signin/token_service_factory.h" 58 #include "chrome/browser/signin/token_service_factory.h"
59 #include "chrome/browser/sync/profile_sync_service.h" 59 #include "chrome/browser/sync/profile_sync_service.h"
60 #include "chrome/browser/sync/profile_sync_service_factory.h" 60 #include "chrome/browser/sync/profile_sync_service_factory.h"
61 #include "chrome/browser/ui/browser_init.h" 61 #include "chrome/browser/ui/startup/startup_browser_creator.h"
62 #include "chrome/common/chrome_notification_types.h" 62 #include "chrome/common/chrome_notification_types.h"
63 #include "chrome/common/chrome_paths.h" 63 #include "chrome/common/chrome_paths.h"
64 #include "chrome/common/chrome_switches.h" 64 #include "chrome/common/chrome_switches.h"
65 #include "chrome/common/logging_chrome.h" 65 #include "chrome/common/logging_chrome.h"
66 #include "chrome/common/net/gaia/gaia_auth_consumer.h" 66 #include "chrome/common/net/gaia/gaia_auth_consumer.h"
67 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" 67 #include "chrome/common/net/gaia/gaia_auth_fetcher.h"
68 #include "chrome/common/net/gaia/gaia_constants.h" 68 #include "chrome/common/net/gaia/gaia_constants.h"
69 #include "chrome/common/net/gaia/gaia_urls.h" 69 #include "chrome/common/net/gaia/gaia_urls.h"
70 #include "chrome/common/pref_names.h" 70 #include "chrome/common/pref_names.h"
71 #include "chrome/common/url_constants.h" 71 #include "chrome/common/url_constants.h"
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 LoginDisplayHost* login_host) { 708 LoginDisplayHost* login_host) {
709 if (browser_shutdown::IsTryingToQuit()) 709 if (browser_shutdown::IsTryingToQuit())
710 return; 710 return;
711 711
712 if (login_host) 712 if (login_host)
713 login_host->SetStatusAreaVisible(true); 713 login_host->SetStatusAreaVisible(true);
714 714
715 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false); 715 BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false);
716 716
717 VLOG(1) << "Launching browser..."; 717 VLOG(1) << "Launching browser...";
718 BrowserInit browser_init; 718 StartupBrowserCreator browser_creator;
719 int return_code; 719 int return_code;
720 BrowserInit::IsFirstRun first_run = first_run::IsChromeFirstRun() ? 720 StartupBrowserCreator::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
721 BrowserInit::IS_FIRST_RUN: BrowserInit::IS_NOT_FIRST_RUN; 721 StartupBrowserCreator::IS_FIRST_RUN :
722 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), 722 StartupBrowserCreator::IS_NOT_FIRST_RUN;
723 profile, 723 browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(),
724 FilePath(), 724 profile,
725 BrowserInit::IS_PROCESS_STARTUP, 725 FilePath(),
726 first_run, 726 StartupBrowserCreator::IS_PROCESS_STARTUP,
727 &return_code); 727 first_run,
728 &return_code);
728 729
729 // Mark login host for deletion after browser starts. This 730 // Mark login host for deletion after browser starts. This
730 // guarantees that the message loop will be referenced by the 731 // guarantees that the message loop will be referenced by the
731 // browser before it is dereferenced by the login host. 732 // browser before it is dereferenced by the login host.
732 if (login_host) { 733 if (login_host) {
733 login_host->OnSessionStart(); 734 login_host->OnSessionStart();
734 } 735 }
735 UserManager::Get()->SessionStarted(); 736 UserManager::Get()->SessionStarted();
736 } 737 }
737 738
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 bool LoginUtils::IsWhitelisted(const std::string& username) { 1455 bool LoginUtils::IsWhitelisted(const std::string& username) {
1455 CrosSettings* cros_settings = CrosSettings::Get(); 1456 CrosSettings* cros_settings = CrosSettings::Get();
1456 bool allow_new_user = false; 1457 bool allow_new_user = false;
1457 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 1458 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
1458 if (allow_new_user) 1459 if (allow_new_user)
1459 return true; 1460 return true;
1460 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); 1461 return cros_settings->FindEmailInList(kAccountsPrefUsers, username);
1461 } 1462 }
1462 1463
1463 } // namespace chromeos 1464 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.h ('k') | chrome/browser/chromeos/login/user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698