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

Side by Side Diff: chrome/browser/sync/profile_sync_service_preference_unittest.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 virtual void SetUp() { 121 virtual void SetUp() {
122 AbstractProfileSyncServiceTest::SetUp(); 122 AbstractProfileSyncServiceTest::SetUp();
123 profile_.reset(new TestingProfile()); 123 profile_.reset(new TestingProfile());
124 profile_->CreateRequestContext(); 124 profile_->CreateRequestContext();
125 prefs_ = profile_->GetTestingPrefService(); 125 prefs_ = profile_->GetTestingPrefService();
126 126
127 prefs_->registry()->RegisterStringPref( 127 prefs_->registry()->RegisterStringPref(
128 not_synced_preference_name_.c_str(), 128 not_synced_preference_name_.c_str(),
129 not_synced_preference_default_value_, 129 not_synced_preference_default_value_,
130 PrefRegistrySyncable::UNSYNCABLE_PREF); 130 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
131 } 131 }
132 132
133 virtual void TearDown() { 133 virtual void TearDown() {
134 profile_.reset(); 134 profile_.reset();
135 AbstractProfileSyncServiceTest::TearDown(); 135 AbstractProfileSyncServiceTest::TearDown();
136 } 136 }
137 137
138 int GetSyncPreferenceCount() { 138 int GetSyncPreferenceCount() {
139 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); 139 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
140 syncer::ReadNode node(&trans); 140 syncer::ReadNode node(&trans);
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 EXPECT_FALSE(pref->IsDefaultValue()); 676 EXPECT_FALSE(pref->IsDefaultValue());
677 // There should be no synced value. 677 // There should be no synced value.
678 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 678 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
679 // Switch kHomePage back to unmanaged. 679 // Switch kHomePage back to unmanaged.
680 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage); 680 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage);
681 // The original value should be picked up. 681 // The original value should be picked up.
682 EXPECT_TRUE(pref->IsDefaultValue()); 682 EXPECT_TRUE(pref->IsDefaultValue());
683 // There should still be no synced value. 683 // There should still be no synced value.
684 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 684 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
685 } 685 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/invalidations/invalidator_storage.cc ('k') | chrome/browser/sync/sync_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698