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

Side by Side Diff: chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc

Issue 15024007: Eliminate BrowserProcess dependency from sign-in production code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR Created 7 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/policy/browser_policy_connector.h" 10 #include "chrome/browser/policy/browser_policy_connector.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 static const char kHostedDomainResponse[] = 58 static const char kHostedDomainResponse[] =
59 "{" 59 "{"
60 " \"hd\": \"test.com\"" 60 " \"hd\": \"test.com\""
61 "}"; 61 "}";
62 62
63 namespace { 63 namespace {
64 class SigninManagerFake : public FakeSigninManager { 64 class SigninManagerFake : public FakeSigninManager {
65 public: 65 public:
66 explicit SigninManagerFake(Profile* profile) 66 explicit SigninManagerFake(Profile* profile)
67 : FakeSigninManager(profile) { 67 : FakeSigninManager(profile) {
68 Initialize(profile); 68 Initialize(profile, NULL);
69 } 69 }
70 70
71 void ForceSignOut() { 71 void ForceSignOut() {
72 // Allow signing out now. 72 // Allow signing out now.
73 prohibit_signout_ = false; 73 prohibit_signout_ = false;
74 SignOut(); 74 SignOut();
75 } 75 }
76 76
77 static ProfileKeyedService* Build(content::BrowserContext* profile) { 77 static ProfileKeyedService* Build(content::BrowserContext* profile) {
78 return new SigninManagerFake(static_cast<Profile*>(profile)); 78 return new SigninManagerFake(static_cast<Profile*>(profile));
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 fetch_request->SendResponse(DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED, 702 fetch_request->SendResponse(DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED,
703 em::DeviceManagementResponse()); 703 em::DeviceManagementResponse());
704 base::RunLoop().RunUntilIdle(); 704 base::RunLoop().RunUntilIdle();
705 EXPECT_FALSE(manager_->IsClientRegistered()); 705 EXPECT_FALSE(manager_->IsClientRegistered());
706 EXPECT_FALSE(signin_manager_->IsSignoutProhibited()); 706 EXPECT_FALSE(signin_manager_->IsSignoutProhibited());
707 } 707 }
708 708
709 } // namespace 709 } // namespace
710 710
711 } // namespace policy 711 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/user_cloud_policy_store_unittest.cc ('k') | chrome/browser/signin/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698