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

Side by Side Diff: chrome/browser/signin/signin_manager_unittest.cc

Issue 168993002: Move encryptor API out of webdata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios fix Created 6 years, 10 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/signin/signin_manager.h" 5 #include "chrome/browser/signin/signin_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "base/prefs/testing_pref_service.h" 11 #include "base/prefs/testing_pref_service.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chrome_notification_types.h" 15 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/prefs/browser_prefs.h" 16 #include "chrome/browser/prefs/browser_prefs.h"
17 #include "chrome/browser/signin/chrome_signin_manager_delegate.h" 17 #include "chrome/browser/signin/chrome_signin_manager_delegate.h"
18 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" 18 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
19 #include "chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.h" 19 #include "chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.h"
20 #include "chrome/browser/signin/profile_oauth2_token_service.h" 20 #include "chrome/browser/signin/profile_oauth2_token_service.h"
21 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 21 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
22 #include "chrome/browser/signin/signin_manager_factory.h" 22 #include "chrome/browser/signin/signin_manager_factory.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "chrome/common/url_constants.h" 24 #include "chrome/common/url_constants.h"
25 #include "chrome/test/base/testing_browser_process.h" 25 #include "chrome/test/base/testing_browser_process.h"
26 #include "chrome/test/base/testing_profile.h" 26 #include "chrome/test/base/testing_profile.h"
27 #include "components/webdata/encryptor/encryptor.h" 27 #include "components/encryptor/encryptor.h"
Lei Zhang 2014/02/18 01:48:56 Not used?
tfarina 2014/02/21 02:14:41 Done.
28 #include "content/public/browser/child_process_security_policy.h" 28 #include "content/public/browser/child_process_security_policy.h"
29 #include "content/public/browser/notification_source.h" 29 #include "content/public/browser/notification_source.h"
30 #include "content/public/test/test_browser_thread_bundle.h" 30 #include "content/public/test/test_browser_thread_bundle.h"
31 #include "google_apis/gaia/gaia_constants.h" 31 #include "google_apis/gaia/gaia_constants.h"
32 #include "google_apis/gaia/gaia_urls.h" 32 #include "google_apis/gaia/gaia_urls.h"
33 #include "net/cookies/cookie_monster.h" 33 #include "net/cookies/cookie_monster.h"
34 #include "net/url_request/test_url_fetcher_factory.h" 34 #include "net/url_request/test_url_fetcher_factory.h"
35 #include "net/url_request/url_request.h" 35 #include "net/url_request/url_request.h"
36 #include "net/url_request/url_request_context_getter.h" 36 #include "net/url_request/url_request_context_getter.h"
37 #include "net/url_request/url_request_status.h" 37 #include "net/url_request/url_request_status.h"
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 profile()->GetPrefs()->GetString(prefs::kGoogleServicesUsername)); 574 profile()->GetPrefs()->GetString(prefs::kGoogleServicesUsername));
575 EXPECT_EQ("external@example.com", manager_->GetAuthenticatedUsername()); 575 EXPECT_EQ("external@example.com", manager_->GetAuthenticatedUsername());
576 } 576 }
577 577
578 TEST_F(SigninManagerTest, SigninNotAllowed) { 578 TEST_F(SigninManagerTest, SigninNotAllowed) {
579 std::string user("user@google.com"); 579 std::string user("user@google.com");
580 profile()->GetPrefs()->SetString(prefs::kGoogleServicesUsername, user); 580 profile()->GetPrefs()->SetString(prefs::kGoogleServicesUsername, user);
581 profile()->GetPrefs()->SetBoolean(prefs::kSigninAllowed, false); 581 profile()->GetPrefs()->SetBoolean(prefs::kSigninAllowed, false);
582 CreateSigninManagerAsService(); 582 CreateSigninManagerAsService();
583 } 583 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698