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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 : FakeSigninManager(profile) { 67 : FakeSigninManager(profile) {
68 Initialize(profile, NULL); 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 BrowserContextKeyedService* Build(content::BrowserContext* profile) {
78 return new SigninManagerFake(static_cast<Profile*>(profile)); 78 return new SigninManagerFake(static_cast<Profile*>(profile));
79 } 79 }
80 }; 80 };
81 } // namespace 81 } // namespace
82 82
83 class UserPolicySigninServiceTest : public testing::Test { 83 class UserPolicySigninServiceTest : public testing::Test {
84 public: 84 public:
85 UserPolicySigninServiceTest() 85 UserPolicySigninServiceTest()
86 : loop_(MessageLoop::TYPE_IO), 86 : loop_(MessageLoop::TYPE_IO),
87 ui_thread_(content::BrowserThread::UI, &loop_), 87 ui_thread_(content::BrowserThread::UI, &loop_),
(...skipping 614 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

Powered by Google App Engine
This is Rietveld 408576698