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

Side by Side Diff: components/user_prefs/tracked/tracked_preferences_migration_unittest.cc

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 "components/user_prefs/tracked/tracked_preferences_migration.h" 5 #include "components/user_prefs/tracked/tracked_preferences_migration.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 base::Bind(&TrackedPreferencesMigrationTest::GetPrefsBack, 286 base::Bind(&TrackedPreferencesMigrationTest::GetPrefsBack,
287 base::Unretained(this), MOCK_PROTECTED_PREF_STORE), 287 base::Unretained(this), MOCK_PROTECTED_PREF_STORE),
288 std::move(protected_prefs_)); 288 std::move(protected_prefs_));
289 break; 289 break;
290 } 290 }
291 } 291 }
292 292
293 bool HasPrefs(MockPrefStoreID store_id) { 293 bool HasPrefs(MockPrefStoreID store_id) {
294 switch (store_id) { 294 switch (store_id) {
295 case MOCK_UNPROTECTED_PREF_STORE: 295 case MOCK_UNPROTECTED_PREF_STORE:
296 return unprotected_prefs_; 296 return !!unprotected_prefs_;
297 case MOCK_PROTECTED_PREF_STORE: 297 case MOCK_PROTECTED_PREF_STORE:
298 return protected_prefs_; 298 return !!protected_prefs_;
299 } 299 }
300 NOTREACHED(); 300 NOTREACHED();
301 return false; 301 return false;
302 } 302 }
303 303
304 bool StoreModifiedByMigration(MockPrefStoreID store_id) { 304 bool StoreModifiedByMigration(MockPrefStoreID store_id) {
305 switch (store_id) { 305 switch (store_id) {
306 case MOCK_UNPROTECTED_PREF_STORE: 306 case MOCK_UNPROTECTED_PREF_STORE:
307 return migration_modified_unprotected_store_; 307 return migration_modified_unprotected_store_;
308 case MOCK_PROTECTED_PREF_STORE: 308 case MOCK_PROTECTED_PREF_STORE:
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 expected_unprotected_values); 897 expected_unprotected_values);
898 898
899 base::StringPairs expected_protected_values; 899 base::StringPairs expected_protected_values;
900 expected_protected_values.push_back(std::make_pair( 900 expected_protected_values.push_back(std::make_pair(
901 kProtectedPref, kProtectedPrefValue)); 901 kProtectedPref, kProtectedPrefValue));
902 expected_protected_values.push_back(std::make_pair( 902 expected_protected_values.push_back(std::make_pair(
903 kPreviouslyUnprotectedPref, kPreviouslyUnprotectedPrefValue)); 903 kPreviouslyUnprotectedPref, kPreviouslyUnprotectedPrefValue));
904 VerifyValuesStored(MOCK_PROTECTED_PREF_STORE, expected_protected_values); 904 VerifyValuesStored(MOCK_PROTECTED_PREF_STORE, expected_protected_values);
905 } 905 }
906 } 906 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698