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

Side by Side Diff: chrome/browser/profile_resetter/brandcoded_default_settings.cc

Issue 335703005: Remove redandunt chrome/common include from chrome/browser/search_engines (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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/profile_resetter/profile_resetter.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/profile_resetter/brandcoded_default_settings.h" 5 #include "chrome/browser/profile_resetter/brandcoded_default_settings.h"
6 6
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "chrome/installer/util/master_preferences_constants.h" 10 #include "chrome/installer/util/master_preferences_constants.h"
11 #include "components/search_engines/search_engines_pref_names.h"
11 #include "extensions/common/extension.h" 12 #include "extensions/common/extension.h"
12 13
13 BrandcodedDefaultSettings::BrandcodedDefaultSettings() { 14 BrandcodedDefaultSettings::BrandcodedDefaultSettings() {
14 } 15 }
15 16
16 BrandcodedDefaultSettings::BrandcodedDefaultSettings(const std::string& prefs) { 17 BrandcodedDefaultSettings::BrandcodedDefaultSettings(const std::string& prefs) {
17 if (!prefs.empty()) { 18 if (!prefs.empty()) {
18 JSONStringValueSerializer json(prefs); 19 JSONStringValueSerializer json(prefs);
19 std::string error; 20 std::string error;
20 scoped_ptr<base::Value> root(json.Deserialize(NULL, &error)); 21 scoped_ptr<base::Value> root(json.Deserialize(NULL, &error));
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 scoped_ptr<base::ListValue> BrandcodedDefaultSettings::ExtractList( 94 scoped_ptr<base::ListValue> BrandcodedDefaultSettings::ExtractList(
94 const char* pref_name) const { 95 const char* pref_name) const {
95 const base::ListValue* value = NULL; 96 const base::ListValue* value = NULL;
96 if (master_dictionary_ && 97 if (master_dictionary_ &&
97 master_dictionary_->GetList(pref_name, &value) && 98 master_dictionary_->GetList(pref_name, &value) &&
98 !value->empty()) { 99 !value->empty()) {
99 return scoped_ptr<base::ListValue>(value->DeepCopy()); 100 return scoped_ptr<base::ListValue>(value->DeepCopy());
100 } 101 }
101 return scoped_ptr<base::ListValue>(); 102 return scoped_ptr<base::ListValue>();
102 } 103 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698