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

Side by Side Diff: chrome/browser/extensions/external_pref_extension_loader.cc

Issue 7572032: base: Remove unnecessary using declarations from values.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « base/values.cc ('k') | content/common/json_value_serializer.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extensions/external_pref_extension_loader.h" 5 #include "chrome/browser/extensions/external_pref_extension_loader.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "content/browser/browser_thread.h" 11 #include "content/browser/browser_thread.h"
12 #include "content/common/json_value_serializer.h" 12 #include "content/common/json_value_serializer.h"
13 13
14 namespace { 14 namespace {
15 15
16 // Caller takes ownership of the returned dictionary. 16 // Caller takes ownership of the returned dictionary.
17 DictionaryValue* ExtractPrefs(const FilePath& path, 17 DictionaryValue* ExtractPrefs(const FilePath& path,
18 ValueSerializer* serializer) { 18 base::ValueSerializer* serializer) {
19 std::string error_msg; 19 std::string error_msg;
20 Value* extensions = serializer->Deserialize(NULL, &error_msg); 20 Value* extensions = serializer->Deserialize(NULL, &error_msg);
21 if (!extensions) { 21 if (!extensions) {
22 LOG(WARNING) << "Unable to deserialize json data: " << error_msg 22 LOG(WARNING) << "Unable to deserialize json data: " << error_msg
23 << " In file " << path.value() << " ."; 23 << " In file " << path.value() << " .";
24 } else { 24 } else {
25 if (!extensions->IsType(Value::TYPE_DICTIONARY)) { 25 if (!extensions->IsType(Value::TYPE_DICTIONARY)) {
26 LOG(WARNING) << "Expected a JSON dictionary in file " 26 LOG(WARNING) << "Expected a JSON dictionary in file "
27 << path.value() << " ."; 27 << path.value() << " .";
28 } else { 28 } else {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 109 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
110 prefs_.reset(testing_prefs_->DeepCopy()); 110 prefs_.reset(testing_prefs_->DeepCopy());
111 LoadFinished(); 111 LoadFinished();
112 } 112 }
113 113
114 ExternalTestingExtensionLoader::~ExternalTestingExtensionLoader() {} 114 ExternalTestingExtensionLoader::~ExternalTestingExtensionLoader() {}
115 115
116 const FilePath ExternalTestingExtensionLoader::GetBaseCrxFilePath() { 116 const FilePath ExternalTestingExtensionLoader::GetBaseCrxFilePath() {
117 return fake_base_path_; 117 return fake_base_path_;
118 } 118 }
OLDNEW
« no previous file with comments | « base/values.cc ('k') | content/common/json_value_serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698