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

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

Issue 10703108: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/zoom_bubble_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_gallery_registry.h" 5 #include "chrome/browser/media_gallery/media_gallery_registry.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 DictionaryValue* dict = new DictionaryValue(); 51 DictionaryValue* dict = new DictionaryValue();
52 dict->SetString(kMediaGalleryIdKey, base::Uint64ToString(gallery.id)); 52 dict->SetString(kMediaGalleryIdKey, base::Uint64ToString(gallery.id));
53 dict->SetString(kMediaGalleryPathKey, gallery.path.value()); 53 dict->SetString(kMediaGalleryPathKey, gallery.path.value());
54 // TODO(estade): save |path| and |identifier|. 54 // TODO(estade): save |path| and |identifier|.
55 dict->SetString(kMediaGalleryDisplayNameKey, gallery.display_name); 55 dict->SetString(kMediaGalleryDisplayNameKey, gallery.display_name);
56 return dict; 56 return dict;
57 } 57 }
58 58
59 } // namespace 59 } // namespace
60 60
61 MediaGallery::MediaGallery() {} 61 MediaGallery::MediaGallery() : id(0) {}
62 MediaGallery::~MediaGallery() {} 62 MediaGallery::~MediaGallery() {}
63 63
64 MediaGalleryRegistry::MediaGalleryRegistry(Profile* profile) 64 MediaGalleryRegistry::MediaGalleryRegistry(Profile* profile)
65 : profile_(profile) { 65 : profile_(profile) {
66 DCHECK(UserInteractionIsEnabled()); 66 DCHECK(UserInteractionIsEnabled());
67 InitFromPrefs(); 67 InitFromPrefs();
68 } 68 }
69 69
70 MediaGalleryRegistry::~MediaGalleryRegistry() {} 70 MediaGalleryRegistry::~MediaGalleryRegistry() {}
71 71
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // static 135 // static
136 void MediaGalleryRegistry::RegisterUserPrefs(PrefService* prefs) { 136 void MediaGalleryRegistry::RegisterUserPrefs(PrefService* prefs) {
137 if (!UserInteractionIsEnabled()) 137 if (!UserInteractionIsEnabled())
138 return; 138 return;
139 139
140 prefs->RegisterListPref(prefs::kMediaGalleryRememberedGalleries, 140 prefs->RegisterListPref(prefs::kMediaGalleryRememberedGalleries,
141 PrefService::UNSYNCABLE_PREF); 141 PrefService::UNSYNCABLE_PREF);
142 prefs->RegisterUint64Pref(prefs::kMediaGalleryUniqueId, 0, 142 prefs->RegisterUint64Pref(prefs::kMediaGalleryUniqueId, 0,
143 PrefService::UNSYNCABLE_PREF); 143 PrefService::UNSYNCABLE_PREF);
144 } 144 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/zoom_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698