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

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

Issue 78763002: Move PolicyMap and its dependencies to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export nested struct Created 7 years, 1 month 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/external_data_fetcher.h"
25 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 24 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
26 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" 25 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h"
27 #include "chrome/browser/policy/schema_registry.h" 26 #include "chrome/browser/policy/schema_registry.h"
28 #include "chrome/browser/prefs/browser_prefs.h" 27 #include "chrome/browser/prefs/browser_prefs.h"
29 #include "chrome/browser/prefs/pref_service_syncable.h" 28 #include "chrome/browser/prefs/pref_service_syncable.h"
30 #include "chrome/browser/signin/profile_oauth2_token_service.h" 29 #include "chrome/browser/signin/profile_oauth2_token_service.h"
31 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 30 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
32 #include "chrome/browser/signin/signin_manager.h" 31 #include "chrome/browser/signin/signin_manager.h"
33 #include "chrome/browser/signin/signin_manager_factory.h" 32 #include "chrome/browser/signin/signin_manager_factory.h"
34 #include "chrome/browser/signin/token_service.h" 33 #include "chrome/browser/signin/token_service.h"
35 #include "chrome/browser/signin/token_service_factory.h" 34 #include "chrome/browser/signin/token_service_factory.h"
36 #include "chrome/common/chrome_constants.h" 35 #include "chrome/common/chrome_constants.h"
37 #include "chrome/test/base/testing_browser_process.h" 36 #include "chrome/test/base/testing_browser_process.h"
38 #include "chrome/test/base/testing_profile.h" 37 #include "chrome/test/base/testing_profile.h"
39 #include "chrome/test/base/testing_profile_manager.h" 38 #include "chrome/test/base/testing_profile_manager.h"
39 #include "components/policy/core/common/external_data_fetcher.h"
40 #include "content/public/test/test_browser_thread_bundle.h" 40 #include "content/public/test/test_browser_thread_bundle.h"
41 #include "google_apis/gaia/gaia_auth_consumer.h" 41 #include "google_apis/gaia/gaia_auth_consumer.h"
42 #include "google_apis/gaia/gaia_urls.h" 42 #include "google_apis/gaia/gaia_urls.h"
43 #include "net/url_request/test_url_fetcher_factory.h" 43 #include "net/url_request/test_url_fetcher_factory.h"
44 #include "net/url_request/url_fetcher_delegate.h" 44 #include "net/url_request/url_fetcher_delegate.h"
45 #include "net/url_request/url_request_context_getter.h" 45 #include "net/url_request/url_request_context_getter.h"
46 #include "net/url_request/url_request_status.h" 46 #include "net/url_request/url_request_status.h"
47 #include "policy/policy_constants.h" 47 #include "policy/policy_constants.h"
48 #include "testing/gmock/include/gmock/gmock.h" 48 #include "testing/gmock/include/gmock/gmock.h"
49 #include "testing/gtest/include/gtest/gtest.h" 49 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 553 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
554 EXPECT_TRUE(manager_->core()->client()->is_registered()); 554 EXPECT_TRUE(manager_->core()->client()->is_registered());
555 555
556 // The refresh scheduler takes care of the initial fetch for unmanaged users. 556 // The refresh scheduler takes care of the initial fetch for unmanaged users.
557 // Running the task runner issues the initial fetch. 557 // Running the task runner issues the initial fetch.
558 FetchPolicy( 558 FetchPolicy(
559 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_)); 559 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_));
560 } 560 }
561 561
562 } // namespace policy 562 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698