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

Side by Side Diff: components/syncable_prefs/pref_model_associator_unittest.cc

Issue 1302303002: Remove year+ old migration support of "session.urls_to_restore_on_startup". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable_unittest
Patch Set: Address comments Created 5 years 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/scoped_user_pref_update.h" 8 #include "base/prefs/scoped_user_pref_update.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "components/syncable_prefs/pref_model_associator.h" 10 #include "components/syncable_prefs/pref_model_associator.h"
(...skipping 18 matching lines...) Expand all
29 // PrefModelAssociatorClient implementation. 29 // PrefModelAssociatorClient implementation.
30 bool IsMergeableListPreference(const std::string& pref_name) const override { 30 bool IsMergeableListPreference(const std::string& pref_name) const override {
31 return pref_name == kListPrefName; 31 return pref_name == kListPrefName;
32 } 32 }
33 33
34 bool IsMergeableDictionaryPreference( 34 bool IsMergeableDictionaryPreference(
35 const std::string& pref_name) const override { 35 const std::string& pref_name) const override {
36 return pref_name == kDictionaryPrefName; 36 return pref_name == kDictionaryPrefName;
37 } 37 }
38 38
39 bool IsMigratedPreference(const std::string& new_pref_name,
40 std::string* old_pref_name) const override {
41 return false;
42 }
43
44 bool IsOldMigratedPreference(const std::string& old_pref_name,
45 std::string* new_pref_name) const override {
46 return false;
47 }
48
49 private: 39 private:
50 DISALLOW_COPY_AND_ASSIGN(TestPrefModelAssociatorClient); 40 DISALLOW_COPY_AND_ASSIGN(TestPrefModelAssociatorClient);
51 }; 41 };
52 42
53 class AbstractPreferenceMergeTest : public testing::Test { 43 class AbstractPreferenceMergeTest : public testing::Test {
54 protected: 44 protected:
55 AbstractPreferenceMergeTest() { 45 AbstractPreferenceMergeTest() {
56 PrefServiceMockFactory factory; 46 PrefServiceMockFactory factory;
57 factory.SetPrefModelAssociatorClient(&client_); 47 factory.SetPrefModelAssociatorClient(&client_);
58 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry( 48 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry(
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 base::DictionaryValue server_patterns_; 457 base::DictionaryValue server_patterns_;
468 }; 458 };
469 459
470 TEST_F(IndividualPreferenceMergeTest, ListPreference) { 460 TEST_F(IndividualPreferenceMergeTest, ListPreference) {
471 EXPECT_TRUE(MergeListPreference(kListPrefName)); 461 EXPECT_TRUE(MergeListPreference(kListPrefName));
472 } 462 }
473 463
474 } // namespace 464 } // namespace
475 465
476 } // namespace syncable_prefs 466 } // namespace syncable_prefs
OLDNEW
« no previous file with comments | « components/syncable_prefs/pref_model_associator_client.h ('k') | components/syncable_prefs/pref_service_syncable_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698