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

Side by Side Diff: chrome/installer/util/master_preferences.cc

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 years, 4 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 #include "chrome/installer/util/master_preferences.h" 5 #include "chrome/installer/util/master_preferences.h"
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 21 matching lines...) Expand all
32 GURL gurl(url); 32 GURL gurl(url);
33 *out_value = gurl; 33 *out_value = gurl;
34 return true; 34 return true;
35 } 35 }
36 36
37 std::vector<GURL> GetNamedList(const char* name, 37 std::vector<GURL> GetNamedList(const char* name,
38 const DictionaryValue* prefs) { 38 const DictionaryValue* prefs) {
39 std::vector<GURL> list; 39 std::vector<GURL> list;
40 if (!prefs) 40 if (!prefs)
41 return list; 41 return list;
42 ListValue* value_list = NULL; 42 const ListValue* value_list = NULL;
43 if (!prefs->GetList(name, &value_list)) 43 if (!prefs->GetList(name, &value_list))
44 return list; 44 return list;
45 for (size_t i = 0; i < value_list->GetSize(); ++i) { 45 for (size_t i = 0; i < value_list->GetSize(); ++i) {
46 Value* entry; 46 Value* entry;
47 GURL gurl_entry; 47 GURL gurl_entry;
48 if (!value_list->Get(i, &entry) || !GetGURLFromValue(entry, &gurl_entry)) { 48 if (!value_list->Get(i, &entry) || !GetGURLFromValue(entry, &gurl_entry)) {
49 NOTREACHED(); 49 NOTREACHED();
50 break; 50 break;
51 } 51 }
52 list.push_back(gurl_entry); 52 list.push_back(gurl_entry);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 bool MasterPreferences::GetExtensionsBlock(DictionaryValue** extensions) const { 265 bool MasterPreferences::GetExtensionsBlock(DictionaryValue** extensions) const {
266 return master_dictionary_->GetDictionary( 266 return master_dictionary_->GetDictionary(
267 master_preferences::kExtensionsBlock, extensions); 267 master_preferences::kExtensionsBlock, extensions);
268 } 268 }
269 269
270 // static 270 // static
271 const MasterPreferences& MasterPreferences::ForCurrentProcess() { 271 const MasterPreferences& MasterPreferences::ForCurrentProcess() {
272 return g_master_preferences.Get(); 272 return g_master_preferences.Get();
273 } 273 }
274 } // installer_util 274 } // installer_util
OLDNEW
« no previous file with comments | « chrome/installer/util/google_chrome_distribution_dummy.cc ('k') | chrome/renderer/chrome_mock_render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698