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

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

Issue 8596017: sync: rename ProfileSyncFactory to ProfileSyncComponentsFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final Created 9 years, 1 month 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) 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_value_serializer.h" 9 #include "base/json/json_value_serializer.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 model_associator_ptr, change_processor_ptr) { 51 model_associator_ptr, change_processor_ptr) {
52 sync_api::UserShare* user_share = profile_sync_service->GetUserShare(); 52 sync_api::UserShare* user_share = profile_sync_service->GetUserShare();
53 *change_processor_ptr = new GenericChangeProcessor( 53 *change_processor_ptr = new GenericChangeProcessor(
54 profile_sync_service, 54 profile_sync_service,
55 pref_sync_service->AsWeakPtr(), 55 pref_sync_service->AsWeakPtr(),
56 user_share); 56 user_share);
57 *model_associator_ptr = new browser_sync::SyncableServiceAdapter( 57 *model_associator_ptr = new browser_sync::SyncableServiceAdapter(
58 syncable::PREFERENCES, 58 syncable::PREFERENCES,
59 pref_sync_service, 59 pref_sync_service,
60 *change_processor_ptr); 60 *change_processor_ptr);
61 return ProfileSyncFactory::SyncComponents(*model_associator_ptr, 61 return ProfileSyncComponentsFactory::SyncComponents(*model_associator_ptr,
62 *change_processor_ptr); 62 *change_processor_ptr);
63 } 63 }
64 64
65 // TODO(zea): Refactor to remove the ProfileSyncService usage. 65 // TODO(zea): Refactor to remove the ProfileSyncService usage.
66 class ProfileSyncServicePreferenceTest 66 class ProfileSyncServicePreferenceTest
67 : public AbstractProfileSyncServiceTest { 67 : public AbstractProfileSyncServiceTest {
68 protected: 68 protected:
69 ProfileSyncServicePreferenceTest() 69 ProfileSyncServicePreferenceTest()
70 : example_url0_("http://example.com/0"), 70 : example_url0_("http://example.com/0"),
71 example_url1_("http://example.com/1"), 71 example_url1_("http://example.com/1"),
72 example_url2_("http://example.com/2"), 72 example_url2_("http://example.com/2"),
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 EXPECT_FALSE(pref->IsDefaultValue()); 561 EXPECT_FALSE(pref->IsDefaultValue());
562 // There should be no synced value. 562 // There should be no synced value.
563 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 563 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
564 // Switch kHomePage back to unmanaged. 564 // Switch kHomePage back to unmanaged.
565 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage); 565 profile_->GetTestingPrefService()->RemoveManagedPref(prefs::kHomePage);
566 // The original value should be picked up. 566 // The original value should be picked up.
567 EXPECT_TRUE(pref->IsDefaultValue()); 567 EXPECT_TRUE(pref->IsDefaultValue());
568 // There should still be no synced value. 568 // There should still be no synced value.
569 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL); 569 EXPECT_TRUE(GetSyncedValue(prefs::kHomePage) == NULL);
570 } 570 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698