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

Side by Side Diff: chrome/browser/media_gallery/media_galleries_preferences.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 "chrome/browser/media_gallery/media_galleries_preferences.h" 5 #include "chrome/browser/media_gallery/media_galleries_preferences.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 413 }
414 414
415 // static 415 // static
416 bool MediaGalleriesPreferences::APIHasBeenUsed(Profile* profile) { 416 bool MediaGalleriesPreferences::APIHasBeenUsed(Profile* profile) {
417 MediaGalleryPrefId current_id = 417 MediaGalleryPrefId current_id =
418 profile->GetPrefs()->GetUint64(prefs::kMediaGalleriesUniqueId); 418 profile->GetPrefs()->GetUint64(prefs::kMediaGalleriesUniqueId);
419 return current_id != kInvalidMediaGalleryPrefId + 1; 419 return current_id != kInvalidMediaGalleryPrefId + 1;
420 } 420 }
421 421
422 // static 422 // static
423 void MediaGalleriesPreferences::RegisterUserPrefs(PrefService* prefs) { 423 void MediaGalleriesPreferences::RegisterUserPrefs(PrefServiceSyncable* prefs) {
424 prefs->RegisterListPref(prefs::kMediaGalleriesRememberedGalleries, 424 prefs->RegisterListPref(prefs::kMediaGalleriesRememberedGalleries,
425 PrefService::UNSYNCABLE_PREF); 425 PrefServiceSyncable::UNSYNCABLE_PREF);
426 prefs->RegisterUint64Pref(prefs::kMediaGalleriesUniqueId, 426 prefs->RegisterUint64Pref(prefs::kMediaGalleriesUniqueId,
427 kInvalidMediaGalleryPrefId + 1, 427 kInvalidMediaGalleryPrefId + 1,
428 PrefService::UNSYNCABLE_PREF); 428 PrefServiceSyncable::UNSYNCABLE_PREF);
429 } 429 }
430 430
431 extensions::ExtensionPrefs* 431 extensions::ExtensionPrefs*
432 MediaGalleriesPreferences::GetExtensionPrefs() const { 432 MediaGalleriesPreferences::GetExtensionPrefs() const {
433 ExtensionService* extension_service = 433 ExtensionService* extension_service =
434 extensions::ExtensionSystem::Get(profile_)->extension_service(); 434 extensions::ExtensionSystem::Get(profile_)->extension_service();
435 return extension_service->extension_prefs(); 435 return extension_service->extension_prefs();
436 } 436 }
437 437
438 } // namespace chrome 438 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698