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

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

Issue 15929005: [CrOS multi-profiles] Restore user sessions after crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 years, 6 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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(), 428 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(),
429 UserContext(username, 429 UserContext(username,
430 "password", 430 "password",
431 std::string(), 431 std::string(),
432 username)); // username_hash 432 username)); // username_hash
433 433
434 const bool kUsingOAuth = true; 434 const bool kUsingOAuth = true;
435 // Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from 435 // Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from
436 // waiting for an IO task before proceeding. 436 // waiting for an IO task before proceeding.
437 const bool kHasCookies = false; 437 const bool kHasCookies = false;
438 const bool kHasActiveSession = false;
438 LoginUtils::Get()->PrepareProfile( 439 LoginUtils::Get()->PrepareProfile(
439 UserContext(username, "password", std::string(), username), 440 UserContext(username, "password", std::string(), username),
440 std::string(), kUsingOAuth, kHasCookies, this); 441 std::string(), kUsingOAuth, kHasCookies, kHasActiveSession, this);
441 device_settings_test_helper.Flush(); 442 device_settings_test_helper.Flush();
442 RunUntilIdle(); 443 RunUntilIdle();
443 444
444 DeviceSettingsService::Get()->UnsetSessionManager(); 445 DeviceSettingsService::Get()->UnsetSessionManager();
445 } 446 }
446 447
447 net::TestURLFetcher* PrepareOAuthFetcher(const std::string& expected_url) { 448 net::TestURLFetcher* PrepareOAuthFetcher(const std::string& expected_url) {
448 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); 449 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0);
449 EXPECT_TRUE(fetcher); 450 EXPECT_TRUE(fetcher);
450 if (!fetcher) 451 if (!fetcher)
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 } 719 }
719 720
720 INSTANTIATE_TEST_CASE_P( 721 INSTANTIATE_TEST_CASE_P(
721 LoginUtilsBlockingLoginTestInstance, 722 LoginUtilsBlockingLoginTestInstance,
722 LoginUtilsBlockingLoginTest, 723 LoginUtilsBlockingLoginTest,
723 testing::Values(0, 1, 2, 3, 4, 5)); 724 testing::Values(0, 1, 2, 3, 4, 5));
724 725
725 } // namespace 726 } // namespace
726 727
727 } 728 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/mock_login_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698