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

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

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 syncer::WriteNode::InitUniqueByCreationResult result = 93 syncer::WriteNode::InitUniqueByCreationResult result =
94 node.InitUniqueByCreation(syncer::PREFERENCES, root, name); 94 node.InitUniqueByCreation(syncer::PREFERENCES, root, name);
95 if (result == syncer::WriteNode::INIT_SUCCESS) 95 if (result == syncer::WriteNode::INIT_SUCCESS)
96 return WriteSyncedValue(name, value, &node); 96 return WriteSyncedValue(name, value, &node);
97 97
98 return syncer::kInvalidId; 98 return syncer::kInvalidId;
99 } 99 }
100 100
101 // DataTypeDebugInfoListener implementation. 101 // DataTypeDebugInfoListener implementation.
102 virtual void OnDataTypeAssociationComplete( 102 virtual void OnDataTypeAssociationComplete(
103 const syncer::DataTypeAssociationStats& association_stats) { 103 const syncer::DataTypeAssociationStats& association_stats) OVERRIDE {
104 association_stats_ = association_stats; 104 association_stats_ = association_stats;
105 } 105 }
106 virtual void OnConfigureComplete() { 106 virtual void OnConfigureComplete() OVERRIDE {
107 // Do nothing. 107 // Do nothing.
108 } 108 }
109 109
110 protected: 110 protected:
111 ProfileSyncServicePreferenceTest() 111 ProfileSyncServicePreferenceTest()
112 : debug_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), 112 : debug_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
113 example_url0_("http://example.com/0"), 113 example_url0_("http://example.com/0"),
114 example_url1_("http://example.com/1"), 114 example_url1_("http://example.com/1"),
115 example_url2_("http://example.com/2"), 115 example_url2_("http://example.com/2"),
116 not_synced_preference_name_("nonsense_pref_name"), 116 not_synced_preference_name_("nonsense_pref_name"),
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 EXPECT_FALSE(pref->IsDefaultValue()); 673 EXPECT_FALSE(pref->IsDefaultValue());
674 // There should be no synced value. 674 // There should be no synced value.
675 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 675 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
676 // Switch kHomePage back to unmanaged. 676 // Switch kHomePage back to unmanaged.
677 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage); 677 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage);
678 // The original value should be picked up. 678 // The original value should be picked up.
679 EXPECT_TRUE(pref->IsDefaultValue()); 679 EXPECT_TRUE(pref->IsDefaultValue());
680 // There should still be no synced value. 680 // There should still be no synced value.
681 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 681 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
682 } 682 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698