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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc

Issue 92153002: Move ConfigurationPolicyProvider, etc. to components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.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/callback.h" 9 #include "base/callback.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/prefs/pref_registry_simple.h" 11 #include "base/prefs/pref_registry_simple.h"
12 #include "base/prefs/testing_pref_service.h" 12 #include "base/prefs/testing_pref_service.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/sequenced_task_runner.h" 14 #include "base/sequenced_task_runner.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "base/test/test_simple_task_runner.h" 17 #include "base/test/test_simple_task_runner.h"
18 #include "chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.h" 18 #include "chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.h"
19 #include "chrome/browser/chromeos/profiles/profile_helper.h" 19 #include "chrome/browser/chromeos/profiles/profile_helper.h"
20 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h" 20 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h"
21 #include "chrome/browser/policy/cloud/mock_cloud_external_data_manager.h" 21 #include "chrome/browser/policy/cloud/mock_cloud_external_data_manager.h"
22 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h" 22 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h"
23 #include "chrome/browser/policy/cloud/mock_device_management_service.h" 23 #include "chrome/browser/policy/cloud/mock_device_management_service.h"
24 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
25 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" 24 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h"
26 #include "chrome/browser/prefs/browser_prefs.h" 25 #include "chrome/browser/prefs/browser_prefs.h"
27 #include "chrome/browser/prefs/pref_service_syncable.h" 26 #include "chrome/browser/prefs/pref_service_syncable.h"
28 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" 27 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
29 #include "chrome/browser/signin/profile_oauth2_token_service.h" 28 #include "chrome/browser/signin/profile_oauth2_token_service.h"
30 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 29 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
31 #include "chrome/common/chrome_constants.h" 30 #include "chrome/common/chrome_constants.h"
32 #include "chrome/test/base/testing_browser_process.h" 31 #include "chrome/test/base/testing_browser_process.h"
33 #include "chrome/test/base/testing_profile.h" 32 #include "chrome/test/base/testing_profile.h"
34 #include "chrome/test/base/testing_profile_manager.h" 33 #include "chrome/test/base/testing_profile_manager.h"
35 #include "components/policy/core/common/external_data_fetcher.h" 34 #include "components/policy/core/common/external_data_fetcher.h"
35 #include "components/policy/core/common/mock_configuration_policy_provider.h"
36 #include "components/policy/core/common/schema_registry.h" 36 #include "components/policy/core/common/schema_registry.h"
37 #include "content/public/test/test_browser_thread_bundle.h" 37 #include "content/public/test/test_browser_thread_bundle.h"
38 #include "google_apis/gaia/gaia_auth_consumer.h" 38 #include "google_apis/gaia/gaia_auth_consumer.h"
39 #include "google_apis/gaia/gaia_constants.h" 39 #include "google_apis/gaia/gaia_constants.h"
40 #include "google_apis/gaia/gaia_urls.h" 40 #include "google_apis/gaia/gaia_urls.h"
41 #include "net/url_request/test_url_fetcher_factory.h" 41 #include "net/url_request/test_url_fetcher_factory.h"
42 #include "net/url_request/url_fetcher_delegate.h" 42 #include "net/url_request/url_fetcher_delegate.h"
43 #include "net/url_request/url_request_context_getter.h" 43 #include "net/url_request/url_request_context_getter.h"
44 #include "net/url_request/url_request_status.h" 44 #include "net/url_request/url_request_status.h"
45 #include "policy/policy_constants.h" 45 #include "policy/policy_constants.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 566 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
567 EXPECT_TRUE(manager_->core()->client()->is_registered()); 567 EXPECT_TRUE(manager_->core()->client()->is_registered());
568 568
569 // The refresh scheduler takes care of the initial fetch for unmanaged users. 569 // The refresh scheduler takes care of the initial fetch for unmanaged users.
570 // Running the task runner issues the initial fetch. 570 // Running the task runner issues the initial fetch.
571 FetchPolicy( 571 FetchPolicy(
572 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_)); 572 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_));
573 } 573 }
574 574
575 } // namespace policy 575 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698