OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/device_local_account_external_polic
y_loader.h" | 5 #include "chrome/browser/chromeos/extensions/device_local_account_external_polic
y_loader.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "base/threading/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
19 #include "base/values.h" | 19 #include "base/values.h" |
20 #include "base/version.h" | 20 #include "base/version.h" |
21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
22 #include "chrome/browser/extensions/external_provider_impl.h" | 22 #include "chrome/browser/extensions/external_provider_impl.h" |
23 #include "chrome/common/chrome_paths.h" | 23 #include "chrome/common/chrome_paths.h" |
24 #include "chrome/test/base/testing_browser_process.h" | 24 #include "chrome/test/base/testing_browser_process.h" |
25 #include "components/policy/core/common/cloud/mock_cloud_policy_store.h" | 25 #include "components/policy/core/common/cloud/mock_cloud_policy_store.h" |
26 #include "components/policy/core/common/policy_map.h" | 26 #include "components/policy/core/common/policy_map.h" |
27 #include "components/policy/core/common/policy_types.h" | 27 #include "components/policy/core/common/policy_types.h" |
| 28 #include "components/policy/policy_constants.h" |
28 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
29 #include "content/public/browser/notification_source.h" | 30 #include "content/public/browser/notification_source.h" |
30 #include "content/public/test/test_browser_thread_bundle.h" | 31 #include "content/public/test/test_browser_thread_bundle.h" |
31 #include "content/public/test/test_utils.h" | 32 #include "content/public/test/test_utils.h" |
32 #include "extensions/browser/external_install_info.h" | 33 #include "extensions/browser/external_install_info.h" |
33 #include "extensions/browser/external_provider_interface.h" | 34 #include "extensions/browser/external_provider_interface.h" |
34 #include "extensions/browser/notification_types.h" | 35 #include "extensions/browser/notification_types.h" |
35 #include "extensions/browser/updater/extension_downloader.h" | 36 #include "extensions/browser/updater/extension_downloader.h" |
36 #include "extensions/common/extension.h" | 37 #include "extensions/common/extension.h" |
37 #include "extensions/common/extension_urls.h" | 38 #include "extensions/common/extension_urls.h" |
38 #include "extensions/common/manifest.h" | 39 #include "extensions/common/manifest.h" |
39 #include "net/url_request/test_url_fetcher_factory.h" | 40 #include "net/url_request/test_url_fetcher_factory.h" |
40 #include "net/url_request/url_fetcher_delegate.h" | 41 #include "net/url_request/url_fetcher_delegate.h" |
41 #include "net/url_request/url_request_context_getter.h" | 42 #include "net/url_request/url_request_context_getter.h" |
42 #include "net/url_request/url_request_test_util.h" | 43 #include "net/url_request/url_request_test_util.h" |
43 #include "policy/policy_constants.h" | |
44 #include "testing/gmock/include/gmock/gmock.h" | 44 #include "testing/gmock/include/gmock/gmock.h" |
45 #include "testing/gtest/include/gtest/gtest.h" | 45 #include "testing/gtest/include/gtest/gtest.h" |
46 #include "url/gurl.h" | 46 #include "url/gurl.h" |
47 | 47 |
48 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
49 #include "chrome/browser/chromeos/settings/cros_settings.h" | 49 #include "chrome/browser/chromeos/settings/cros_settings.h" |
50 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 50 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
51 #endif // defined(OS_CHROMEOS) | 51 #endif // defined(OS_CHROMEOS) |
52 | 52 |
53 using ::testing::Field; | 53 using ::testing::Field; |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 loader_->StopCache(shutdown_run_loop.QuitClosure()); | 311 loader_->StopCache(shutdown_run_loop.QuitClosure()); |
312 VerifyAndResetVisitorCallExpectations(); | 312 VerifyAndResetVisitorCallExpectations(); |
313 | 313 |
314 // Spin the loop until the cache shutdown callback is invoked. Verify that at | 314 // Spin the loop until the cache shutdown callback is invoked. Verify that at |
315 // that point, no further file I/O tasks are pending. | 315 // that point, no further file I/O tasks are pending. |
316 shutdown_run_loop.Run(); | 316 shutdown_run_loop.Run(); |
317 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting()); | 317 EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting()); |
318 } | 318 } |
319 | 319 |
320 } // namespace chromeos | 320 } // namespace chromeos |
OLD | NEW |