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

Side by Side Diff: chrome/test/base/scoped_testing_local_state.cc

Issue 12324009: Remove PrefService parameter from chrome::RegisterPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/signin/signin_manager_unittest.cc ('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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/test/base/scoped_testing_local_state.h" 5 #include "chrome/test/base/scoped_testing_local_state.h"
6 6
7 #include "chrome/browser/prefs/browser_prefs.h" 7 #include "chrome/browser/prefs/browser_prefs.h"
8 #include "chrome/test/base/testing_browser_process.h" 8 #include "chrome/test/base/testing_browser_process.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 ScopedTestingLocalState::ScopedTestingLocalState( 11 ScopedTestingLocalState::ScopedTestingLocalState(
12 TestingBrowserProcess* browser_process) 12 TestingBrowserProcess* browser_process)
13 : browser_process_(browser_process) { 13 : browser_process_(browser_process) {
14 chrome::RegisterLocalState(&local_state_, local_state_.registry()); 14 chrome::RegisterLocalState(local_state_.registry());
15 EXPECT_FALSE(browser_process->local_state()); 15 EXPECT_FALSE(browser_process->local_state());
16 browser_process->SetLocalState(&local_state_); 16 browser_process->SetLocalState(&local_state_);
17 } 17 }
18 18
19 ScopedTestingLocalState::~ScopedTestingLocalState() { 19 ScopedTestingLocalState::~ScopedTestingLocalState() {
20 EXPECT_EQ(&local_state_, browser_process_->local_state()); 20 EXPECT_EQ(&local_state_, browser_process_->local_state());
21 browser_process_->SetLocalState(NULL); 21 browser_process_->SetLocalState(NULL);
22 } 22 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698