OLD | NEW |
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/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.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 "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 // Weak ptr to the MockDeviceManagementService (object is owned by the | 369 // Weak ptr to the MockDeviceManagementService (object is owned by the |
370 // BrowserPolicyConnector). | 370 // BrowserPolicyConnector). |
371 MockDeviceManagementService device_management_service_; | 371 MockDeviceManagementService device_management_service_; |
372 | 372 |
373 scoped_ptr<TestingPrefServiceSimple> local_state_; | 373 scoped_ptr<TestingPrefServiceSimple> local_state_; |
374 scoped_refptr<net::URLRequestContextGetter> system_request_context_getter_; | 374 scoped_refptr<net::URLRequestContextGetter> system_request_context_getter_; |
375 }; | 375 }; |
376 | 376 |
377 class UserPolicySigninServiceSignedInTest : public UserPolicySigninServiceTest { | 377 class UserPolicySigninServiceSignedInTest : public UserPolicySigninServiceTest { |
378 public: | 378 public: |
379 virtual void AddProfile() override { | 379 void AddProfile() override { |
380 // UserCloudPolicyManager should not be initialized. | 380 // UserCloudPolicyManager should not be initialized. |
381 ASSERT_FALSE(manager_->core()->service()); | 381 ASSERT_FALSE(manager_->core()->service()); |
382 | 382 |
383 // Set the user as signed in. | 383 // Set the user as signed in. |
384 SigninManagerFactory::GetForProfile(profile_.get())-> | 384 SigninManagerFactory::GetForProfile(profile_.get())-> |
385 SetAuthenticatedUsername(kTestUser); | 385 SetAuthenticatedUsername(kTestUser); |
386 | 386 |
387 // Let the SigninService know that the profile has been created. | 387 // Let the SigninService know that the profile has been created. |
388 content::NotificationService::current()->Notify( | 388 content::NotificationService::current()->Notify( |
389 chrome::NOTIFICATION_PROFILE_ADDED, | 389 chrome::NOTIFICATION_PROFILE_ADDED, |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 base::RunLoop().RunUntilIdle(); | 806 base::RunLoop().RunUntilIdle(); |
807 EXPECT_FALSE(manager_->IsClientRegistered()); | 807 EXPECT_FALSE(manager_->IsClientRegistered()); |
808 #if !defined(OS_ANDROID) | 808 #if !defined(OS_ANDROID) |
809 EXPECT_FALSE(signin_manager_->IsSignoutProhibited()); | 809 EXPECT_FALSE(signin_manager_->IsSignoutProhibited()); |
810 #endif | 810 #endif |
811 } | 811 } |
812 | 812 |
813 } // namespace | 813 } // namespace |
814 | 814 |
815 } // namespace policy | 815 } // namespace policy |
OLD | NEW |