Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager.cc

Issue 2622913002: Simplify registration of a test ChromeBrowserStateManager. (Closed)
Patch Set: Fix typo in naming variable. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #include "ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager .h"
6
7 #include "ios/chrome/browser/application_context.h"
8 #include "ios/chrome/browser/browser_state/chrome_browser_state_manager.h"
9 #include "ios/chrome/test/testing_application_context.h"
10
11 IOSChromeScopedTestingChromeBrowserStateManager::
12 IOSChromeScopedTestingChromeBrowserStateManager(
13 std::unique_ptr<ios::ChromeBrowserStateManager> browser_state_manager)
14 : browser_state_manager_(std::move(browser_state_manager)),
15 saved_browser_state_manager_(
16 GetApplicationContext()->GetChromeBrowserStateManager()) {
17 TestingApplicationContext::GetGlobal()->SetChromeBrowserStateManager(
18 browser_state_manager_.get());
19 }
20
21 IOSChromeScopedTestingChromeBrowserStateManager::
22 ~IOSChromeScopedTestingChromeBrowserStateManager() {
23 TestingApplicationContext::GetGlobal()->SetChromeBrowserStateManager(
24 saved_browser_state_manager_);
25 }
OLDNEW
« no previous file with comments | « ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_state_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698