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

Side by Side Diff: chrome/browser/media_galleries/media_galleries_preferences_unittest.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 (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 // MediaGalleriesPreferences unit tests. 5 // MediaGalleriesPreferences unit tests.
6 6
7 #include "chrome/browser/media_galleries/media_galleries_preferences.h" 7 #include "chrome/browser/media_galleries/media_galleries_preferences.h"
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 PrefService* prefs = profile_->GetPrefs(); 184 PrefService* prefs = profile_->GetPrefs();
185 std::unique_ptr<ListPrefUpdate> update( 185 std::unique_ptr<ListPrefUpdate> update(
186 new ListPrefUpdate(prefs, prefs::kMediaGalleriesRememberedGalleries)); 186 new ListPrefUpdate(prefs, prefs::kMediaGalleriesRememberedGalleries));
187 base::ListValue* list = update->Get(); 187 base::ListValue* list = update->Get();
188 188
189 for (base::ListValue::iterator iter = list->begin(); 189 for (base::ListValue::iterator iter = list->begin();
190 iter != list->end(); 190 iter != list->end();
191 ++iter) { 191 ++iter) {
192 base::DictionaryValue* dict; 192 base::DictionaryValue* dict;
193 193
194 if (iter->GetAsDictionary(&dict)) { 194 if ((*iter)->GetAsDictionary(&dict)) {
195 // Setting the prefs version to 2 which is the version before 195 // Setting the prefs version to 2 which is the version before
196 // default_gallery_type was added. 196 // default_gallery_type was added.
197 dict->SetInteger(kMediaGalleriesPrefsVersionKey, 2); 197 dict->SetInteger(kMediaGalleriesPrefsVersionKey, 2);
198 dict->Remove(kMediaGalleriesDefaultGalleryTypeKey, NULL); 198 dict->Remove(kMediaGalleriesDefaultGalleryTypeKey, NULL);
199 } 199 }
200 } 200 }
201 update.reset(); 201 update.reset();
202 } 202 }
203 203
204 void Verify() { 204 void Verify() {
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 MediaGalleryPrefInfo::DefaultGalleryType::kNotDefault) { 1527 MediaGalleryPrefInfo::DefaultGalleryType::kNotDefault) {
1528 found_user_added = true; 1528 found_user_added = true;
1529 } 1529 }
1530 } 1530 }
1531 1531
1532 EXPECT_TRUE(found_music); 1532 EXPECT_TRUE(found_music);
1533 EXPECT_TRUE(found_pictures); 1533 EXPECT_TRUE(found_pictures);
1534 EXPECT_TRUE(found_videos); 1534 EXPECT_TRUE(found_videos);
1535 EXPECT_TRUE(found_user_added); 1535 EXPECT_TRUE(found_user_added);
1536 } 1536 }
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_galleries_preferences.cc ('k') | chrome/browser/metrics/plugin_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698