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

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

Issue 12223062: Support variations_seed parameter in MasterPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | « chrome/installer/util/master_preferences.h ('k') | no next file » | 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/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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "chrome/common/env_vars.h" 14 #include "chrome/common/env_vars.h"
15 #include "chrome/common/pref_names.h"
15 #include "chrome/installer/util/master_preferences_constants.h" 16 #include "chrome/installer/util/master_preferences_constants.h"
16 #include "chrome/installer/util/util_constants.h" 17 #include "chrome/installer/util/util_constants.h"
17 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
18 19
19 namespace { 20 namespace {
20 21
21 const char kFirstRunTabs[] = "first_run_tabs"; 22 const char kFirstRunTabs[] = "first_run_tabs";
22 23
23 base::LazyInstance<installer::MasterPreferences> g_master_preferences = 24 base::LazyInstance<installer::MasterPreferences> g_master_preferences =
24 LAZY_INSTANCE_INITIALIZER; 25 LAZY_INSTANCE_INITIALIZER;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 308
308 std::vector<GURL> MasterPreferences::GetFirstRunTabs() const { 309 std::vector<GURL> MasterPreferences::GetFirstRunTabs() const {
309 return GetNamedList(kFirstRunTabs, master_dictionary_.get()); 310 return GetNamedList(kFirstRunTabs, master_dictionary_.get());
310 } 311 }
311 312
312 bool MasterPreferences::GetExtensionsBlock(DictionaryValue** extensions) const { 313 bool MasterPreferences::GetExtensionsBlock(DictionaryValue** extensions) const {
313 return master_dictionary_->GetDictionary( 314 return master_dictionary_->GetDictionary(
314 master_preferences::kExtensionsBlock, extensions); 315 master_preferences::kExtensionsBlock, extensions);
315 } 316 }
316 317
318 std::string MasterPreferences::GetVariationsSeed() const {
319 std::string variations_seed;
320 master_dictionary_->GetString(prefs::kVariationsSeed, &variations_seed);
321 return variations_seed;
322 }
323
317 // static 324 // static
318 const MasterPreferences& MasterPreferences::ForCurrentProcess() { 325 const MasterPreferences& MasterPreferences::ForCurrentProcess() {
319 return g_master_preferences.Get(); 326 return g_master_preferences.Get();
320 } 327 }
321 } // installer_util 328 } // installer_util
OLDNEW
« no previous file with comments | « chrome/installer/util/master_preferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698