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

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

Issue 10332117: Revert 136573 - Extract StartupTabs and startup types from StartupBrowserCreator. (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
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/profiles/avatar_menu_model.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/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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 StartupBrowserCreator browser_creator; 718 StartupBrowserCreator browser_creator;
719 int return_code; 719 int return_code;
720 browser::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ? 720 StartupBrowserCreator::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
721 browser::startup::IS_FIRST_RUN : 721 StartupBrowserCreator::IS_FIRST_RUN :
722 browser::startup::IS_NOT_FIRST_RUN; 722 StartupBrowserCreator::IS_NOT_FIRST_RUN;
723 browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(), 723 browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(),
724 profile, 724 profile,
725 FilePath(), 725 FilePath(),
726 browser::startup::IS_PROCESS_STARTUP, 726 StartupBrowserCreator::IS_PROCESS_STARTUP,
727 first_run, 727 first_run,
728 &return_code); 728 &return_code);
729 729
730 // Mark login host for deletion after browser starts. This 730 // Mark login host for deletion after browser starts. This
731 // guarantees that the message loop will be referenced by the 731 // guarantees that the message loop will be referenced by the
732 // browser before it is dereferenced by the login host. 732 // browser before it is dereferenced by the login host.
733 if (login_host) 733 if (login_host) {
734 login_host->OnSessionStart(); 734 login_host->OnSessionStart();
735 }
735 UserManager::Get()->SessionStarted(); 736 UserManager::Get()->SessionStarted();
736 } 737 }
737 738
738 void LoginUtilsImpl::PrepareProfile( 739 void LoginUtilsImpl::PrepareProfile(
739 const std::string& username, 740 const std::string& username,
740 const std::string& display_email, 741 const std::string& display_email,
741 const std::string& password, 742 const std::string& password,
742 bool pending_requests, 743 bool pending_requests,
743 bool using_oauth, 744 bool using_oauth,
744 bool has_cookies, 745 bool has_cookies,
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 bool LoginUtils::IsWhitelisted(const std::string& username) { 1452 bool LoginUtils::IsWhitelisted(const std::string& username) {
1452 CrosSettings* cros_settings = CrosSettings::Get(); 1453 CrosSettings* cros_settings = CrosSettings::Get();
1453 bool allow_new_user = false; 1454 bool allow_new_user = false;
1454 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 1455 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
1455 if (allow_new_user) 1456 if (allow_new_user)
1456 return true; 1457 return true;
1457 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); 1458 return cros_settings->FindEmailInList(kAccountsPrefUsers, username);
1458 } 1459 }
1459 1460
1460 } // namespace chromeos 1461 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/profiles/avatar_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698