| 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 29 matching lines...) Expand all Loading... |
| 49 component_updater::ComponentUpdateService* GetComponentUpdateService() | 50 component_updater::ComponentUpdateService* GetComponentUpdateService() |
| 50 override; | 51 override; |
| 51 CRLSetFetcher* GetCRLSetFetcher() override; | 52 CRLSetFetcher* GetCRLSetFetcher() override; |
| 52 safe_browsing::SafeBrowsingService* GetSafeBrowsingService() override; | 53 safe_browsing::SafeBrowsingService* GetSafeBrowsingService() override; |
| 53 | 54 |
| 54 private: | 55 private: |
| 55 base::ThreadChecker thread_checker_; | 56 base::ThreadChecker thread_checker_; |
| 56 std::string application_locale_; | 57 std::string application_locale_; |
| 57 PrefService* local_state_; | 58 PrefService* local_state_; |
| 58 ios::ChromeBrowserStateManager* chrome_browser_state_manager_; | 59 ios::ChromeBrowserStateManager* chrome_browser_state_manager_; |
| 59 scoped_ptr<network_time::NetworkTimeTracker> network_time_tracker_; | 60 std::unique_ptr<network_time::NetworkTimeTracker> network_time_tracker_; |
| 60 bool was_last_shutdown_clean_; | 61 bool was_last_shutdown_clean_; |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(TestingApplicationContext); | 63 DISALLOW_COPY_AND_ASSIGN(TestingApplicationContext); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 #endif // IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_ | 66 #endif // IOS_CHROME_TEST_TESTING_APPLICATION_CONTEXT_H_ |
| OLD | NEW |