OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_TEST_IOS_CHROME_SCOPED_TESTING_CHROME_BROWSER_STATE_MANAGER_H
_ |
| 6 #define IOS_CHROME_TEST_IOS_CHROME_SCOPED_TESTING_CHROME_BROWSER_STATE_MANAGER_H
_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 |
| 12 namespace ios { |
| 13 class ChromeBrowserStateManager; |
| 14 } |
| 15 |
| 16 // Helper class to register an ios::ChromeBrowserStateManager against |
| 17 // the TestApplicationContext using local scoping to do proper cleanup. |
| 18 class IOSChromeScopedTestingChromeBrowserStateManager { |
| 19 public: |
| 20 explicit IOSChromeScopedTestingChromeBrowserStateManager( |
| 21 std::unique_ptr<ios::ChromeBrowserStateManager> browser_state_manager); |
| 22 ~IOSChromeScopedTestingChromeBrowserStateManager(); |
| 23 |
| 24 private: |
| 25 std::unique_ptr<ios::ChromeBrowserStateManager> browser_state_manager_; |
| 26 ios::ChromeBrowserStateManager* saved_browser_state_manager_; |
| 27 |
| 28 DISALLOW_COPY_AND_ASSIGN(IOSChromeScopedTestingChromeBrowserStateManager); |
| 29 }; |
| 30 |
| 31 #endif // IOS_CHROME_TEST_IOS_CHROME_SCOPED_TESTING_CHROME_BROWSER_STATE_MANAGE
R_H_ |
OLD | NEW |