OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_ | 5 #ifndef IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_ |
6 #define IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_ | 6 #define IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/threading/thread_checker.h" | 11 #include "base/threading/thread_checker.h" |
11 #include "ios/chrome/browser/application_context.h" | 12 #include "ios/chrome/browser/application_context.h" |
12 | 13 |
13 class TestingApplicationContext : public ApplicationContext { | 14 class TestingApplicationContext : public ApplicationContext { |
14 public: | 15 public: |
15 TestingApplicationContext(); | 16 TestingApplicationContext(); |
16 ~TestingApplicationContext() override; | 17 ~TestingApplicationContext() override; |
17 | 18 |
18 // Convenience method to get the current application context as a | 19 // Convenience method to get the current application context as a |
19 // TestingApplicationContext. | 20 // TestingApplicationContext. |
(...skipping 28 matching lines...) Expand all Loading... |
48 web_resource::PromoResourceService* GetPromoResourceService() override; | 49 web_resource::PromoResourceService* GetPromoResourceService() override; |
49 component_updater::ComponentUpdateService* GetComponentUpdateService() | 50 component_updater::ComponentUpdateService* GetComponentUpdateService() |
50 override; | 51 override; |
51 CRLSetFetcher* GetCRLSetFetcher() override; | 52 CRLSetFetcher* GetCRLSetFetcher() override; |
52 | 53 |
53 private: | 54 private: |
54 base::ThreadChecker thread_checker_; | 55 base::ThreadChecker thread_checker_; |
55 std::string application_locale_; | 56 std::string application_locale_; |
56 PrefService* local_state_; | 57 PrefService* local_state_; |
57 ios::ChromeBrowserStateManager* chrome_browser_state_manager_; | 58 ios::ChromeBrowserStateManager* chrome_browser_state_manager_; |
58 scoped_ptr<network_time::NetworkTimeTracker> network_time_tracker_; | 59 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_; |
59 bool was_last_shutdown_clean_; | 60 bool was_last_shutdown_clean_; |
60 | 61 |
61 DISALLOW_COPY_AND_ASSIGN(TestingApplicationContext); | 62 DISALLOW_COPY_AND_ASSIGN(TestingApplicationContext); |
62 }; | 63 }; |
63 | 64 |
64 #endif // IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_ | 65 #endif // IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_ |
OLD | NEW |