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

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

Issue 15239002: Move Extension and PermissionsData to extensions/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 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/extensions/extension.h"
10 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
11 #include "chrome/installer/util/master_preferences_constants.h" 10 #include "chrome/installer/util/master_preferences_constants.h"
11 #include "extensions/common/extension.h"
12 12
13 BrandcodedDefaultSettings::BrandcodedDefaultSettings() { 13 BrandcodedDefaultSettings::BrandcodedDefaultSettings() {
14 } 14 }
15 15
16 BrandcodedDefaultSettings::BrandcodedDefaultSettings(const std::string& prefs) { 16 BrandcodedDefaultSettings::BrandcodedDefaultSettings(const std::string& prefs) {
17 if (!prefs.empty()) { 17 if (!prefs.empty()) {
18 JSONStringValueSerializer json(prefs); 18 JSONStringValueSerializer json(prefs);
19 std::string error; 19 std::string error;
20 scoped_ptr<base::Value> root(json.Deserialize(NULL, &error)); 20 scoped_ptr<base::Value> root(json.Deserialize(NULL, &error));
21 if (!root.get()) { 21 if (!root.get()) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 scoped_ptr<ListValue> BrandcodedDefaultSettings::ExtractList( 93 scoped_ptr<ListValue> BrandcodedDefaultSettings::ExtractList(
94 const char* pref_name) const { 94 const char* pref_name) const {
95 const base::ListValue* value = NULL; 95 const base::ListValue* value = NULL;
96 if (master_dictionary_ && 96 if (master_dictionary_ &&
97 master_dictionary_->GetList(pref_name, &value) && 97 master_dictionary_->GetList(pref_name, &value) &&
98 !value->empty()) { 98 !value->empty()) {
99 return scoped_ptr<ListValue>(value->DeepCopy()); 99 return scoped_ptr<ListValue>(value->DeepCopy());
100 } 100 }
101 return scoped_ptr<ListValue>(); 101 return scoped_ptr<ListValue>();
102 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/profile_resetter/profile_resetter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698