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

Side by Side Diff: chrome/browser/prefs/prefs_syncable_service_unittest.cc

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 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
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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/json/json_string_value_serializer.h" 6 #include "base/json/json_string_value_serializer.h"
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } 704 }
705 705
706 TEST_F(PrefsSyncableServiceTest, DeletePreference) { 706 TEST_F(PrefsSyncableServiceTest, DeletePreference) {
707 prefs_.SetString(prefs::kHomePage, kExampleUrl0); 707 prefs_.SetString(prefs::kHomePage, kExampleUrl0);
708 const PrefService::Preference* pref = 708 const PrefService::Preference* pref =
709 prefs_.FindPreference(prefs::kHomePage); 709 prefs_.FindPreference(prefs::kHomePage);
710 EXPECT_FALSE(pref->IsDefaultValue()); 710 EXPECT_FALSE(pref->IsDefaultValue());
711 711
712 InitWithNoSyncData(); 712 InitWithNoSyncData();
713 713
714 scoped_ptr<base::Value> null_value(base::Value::CreateNullValue()); 714 scoped_ptr<base::Value> null_value = base::Value::CreateNullValue();
715 syncer::SyncChangeList list; 715 syncer::SyncChangeList list;
716 list.push_back(MakeRemoteChange( 716 list.push_back(MakeRemoteChange(
717 1, prefs::kHomePage, *null_value, SyncChange::ACTION_DELETE)); 717 1, prefs::kHomePage, *null_value, SyncChange::ACTION_DELETE));
718 pref_sync_service_->ProcessSyncChanges(FROM_HERE, list); 718 pref_sync_service_->ProcessSyncChanges(FROM_HERE, list);
719 EXPECT_TRUE(pref->IsDefaultValue()); 719 EXPECT_TRUE(pref->IsDefaultValue());
720 } 720 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_model_associator_unittest.cc ('k') | chrome/browser/prefs/tracked/pref_hash_calculator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698