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 "chrome/browser/extensions/test_extension_prefs.h" | 5 #include "chrome/browser/extensions/test_extension_prefs.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.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/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "base/sequenced_task_runner.h" | 16 #include "base/sequenced_task_runner.h" |
17 #include "base/synchronization/waitable_event.h" | 17 #include "base/synchronization/waitable_event.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 "chrome/browser/extensions/chrome_app_sorting.h" | 20 #include "chrome/browser/extensions/chrome_app_sorting.h" |
21 #include "chrome/browser/extensions/test_extension_system.h" | 21 #include "chrome/browser/extensions/test_extension_system.h" |
22 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 22 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
23 #include "chrome/common/chrome_constants.h" | 23 #include "chrome/common/chrome_constants.h" |
24 #include "components/crx_file/id_util.h" | 24 #include "components/crx_file/id_util.h" |
25 #include "components/pref_registry/pref_registry_syncable.h" | 25 #include "components/pref_registry/pref_registry_syncable.h" |
26 #include "components/prefs/json_pref_store.h" | 26 #include "components/prefs/json_pref_store.h" |
27 #include "components/prefs/pref_value_store.h" | 27 #include "components/prefs/pref_value_store.h" |
| 28 #include "components/sync/api/string_ordinal.h" |
28 #include "components/syncable_prefs/pref_service_mock_factory.h" | 29 #include "components/syncable_prefs/pref_service_mock_factory.h" |
29 #include "components/syncable_prefs/pref_service_syncable.h" | 30 #include "components/syncable_prefs/pref_service_syncable.h" |
30 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
31 #include "extensions/browser/extension_pref_store.h" | 32 #include "extensions/browser/extension_pref_store.h" |
32 #include "extensions/browser/extension_pref_value_map.h" | 33 #include "extensions/browser/extension_pref_value_map.h" |
33 #include "extensions/browser/extension_prefs.h" | 34 #include "extensions/browser/extension_prefs.h" |
34 #include "extensions/browser/extension_prefs_factory.h" | 35 #include "extensions/browser/extension_prefs_factory.h" |
35 #include "extensions/browser/extension_system.h" | 36 #include "extensions/browser/extension_system.h" |
36 #include "extensions/browser/extensions_browser_client.h" | 37 #include "extensions/browser/extensions_browser_client.h" |
37 #include "extensions/common/extension.h" | 38 #include "extensions/common/extension.h" |
38 #include "extensions/common/manifest_constants.h" | 39 #include "extensions/common/manifest_constants.h" |
39 #include "sync/api/string_ordinal.h" | |
40 #include "testing/gtest/include/gtest/gtest.h" | 40 #include "testing/gtest/include/gtest/gtest.h" |
41 | 41 |
42 using content::BrowserThread; | 42 using content::BrowserThread; |
43 | 43 |
44 namespace extensions { | 44 namespace extensions { |
45 | 45 |
46 namespace { | 46 namespace { |
47 | 47 |
48 // A TimeProvider which returns an incrementally later time each time | 48 // A TimeProvider which returns an incrementally later time each time |
49 // GetCurrentTime is called. | 49 // GetCurrentTime is called. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) { | 207 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) { |
208 extensions_disabled_ = extensions_disabled; | 208 extensions_disabled_ = extensions_disabled; |
209 } | 209 } |
210 | 210 |
211 ChromeAppSorting* TestExtensionPrefs::app_sorting() { | 211 ChromeAppSorting* TestExtensionPrefs::app_sorting() { |
212 return static_cast<ChromeAppSorting*>( | 212 return static_cast<ChromeAppSorting*>( |
213 ExtensionSystem::Get(&profile_)->app_sorting()); | 213 ExtensionSystem::Get(&profile_)->app_sorting()); |
214 } | 214 } |
215 | 215 |
216 } // namespace extensions | 216 } // namespace extensions |
OLD | NEW |