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

Side by Side Diff: chrome/browser/prefs/tracked/segregated_pref_store_unittest.cc

Issue 660873002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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 #include "chrome/browser/prefs/tracked/segregated_pref_store.h" 5 #include "chrome/browser/prefs/tracked/segregated_pref_store.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 segregated_store_->AddObserver(&observer_); 77 segregated_store_->AddObserver(&observer_);
78 } 78 }
79 79
80 virtual void TearDown() override { 80 virtual void TearDown() override {
81 segregated_store_->RemoveObserver(&observer_); 81 segregated_store_->RemoveObserver(&observer_);
82 } 82 }
83 83
84 protected: 84 protected:
85 scoped_ptr<PersistentPrefStore::ReadErrorDelegate> GetReadErrorDelegate() { 85 scoped_ptr<PersistentPrefStore::ReadErrorDelegate> GetReadErrorDelegate() {
86 EXPECT_TRUE(read_error_delegate_); 86 EXPECT_TRUE(read_error_delegate_);
87 return read_error_delegate_ 87 return read_error_delegate_.Pass();
88 .PassAs<PersistentPrefStore::ReadErrorDelegate>();
89 } 88 }
90 89
91 PrefStoreObserverMock observer_; 90 PrefStoreObserverMock observer_;
92 91
93 scoped_refptr<TestingPrefStore> default_store_; 92 scoped_refptr<TestingPrefStore> default_store_;
94 scoped_refptr<TestingPrefStore> selected_store_; 93 scoped_refptr<TestingPrefStore> selected_store_;
95 scoped_refptr<SegregatedPrefStore> segregated_store_; 94 scoped_refptr<SegregatedPrefStore> segregated_store_;
96 95
97 MockReadErrorDelegate::Data read_error_delegate_data_; 96 MockReadErrorDelegate::Data read_error_delegate_data_;
98 97
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 selected_store_->SetBlockAsyncRead(true); 262 selected_store_->SetBlockAsyncRead(true);
264 default_store_->SetBlockAsyncRead(true); 263 default_store_->SetBlockAsyncRead(true);
265 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); 264 EXPECT_FALSE(segregated_store_->IsInitializationComplete());
266 segregated_store_->ReadPrefsAsync(NULL); 265 segregated_store_->ReadPrefsAsync(NULL);
267 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); 266 EXPECT_FALSE(segregated_store_->IsInitializationComplete());
268 selected_store_->SetBlockAsyncRead(false); 267 selected_store_->SetBlockAsyncRead(false);
269 EXPECT_FALSE(segregated_store_->IsInitializationComplete()); 268 EXPECT_FALSE(segregated_store_->IsInitializationComplete());
270 default_store_->SetBlockAsyncRead(false); 269 default_store_->SetBlockAsyncRead(false);
271 EXPECT_TRUE(segregated_store_->IsInitializationComplete()); 270 EXPECT_TRUE(segregated_store_->IsInitializationComplete());
272 } 271 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/tracked/pref_hash_filter_unittest.cc ('k') | chrome/browser/printing/print_view_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698