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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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 (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/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_value_serializer.h" 10 #include "base/json/json_value_serializer.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "chrome/common/chrome_paths.h" 14 #include "chrome/common/chrome_paths.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 16
17 using content::BrowserThread;
18
17 namespace { 19 namespace {
18 20
19 // Caller takes ownership of the returned dictionary. 21 // Caller takes ownership of the returned dictionary.
20 DictionaryValue* ExtractPrefs(const FilePath& path, 22 DictionaryValue* ExtractPrefs(const FilePath& path,
21 base::ValueSerializer* serializer) { 23 base::ValueSerializer* serializer) {
22 std::string error_msg; 24 std::string error_msg;
23 Value* extensions = serializer->Deserialize(NULL, &error_msg); 25 Value* extensions = serializer->Deserialize(NULL, &error_msg);
24 if (!extensions) { 26 if (!extensions) {
25 LOG(WARNING) << "Unable to deserialize json data: " << error_msg 27 LOG(WARNING) << "Unable to deserialize json data: " << error_msg
26 << " In file " << path.value() << " ."; 28 << " In file " << path.value() << " .";
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 152 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
151 prefs_.reset(testing_prefs_->DeepCopy()); 153 prefs_.reset(testing_prefs_->DeepCopy());
152 LoadFinished(); 154 LoadFinished();
153 } 155 }
154 156
155 ExternalTestingExtensionLoader::~ExternalTestingExtensionLoader() {} 157 ExternalTestingExtensionLoader::~ExternalTestingExtensionLoader() {}
156 158
157 const FilePath ExternalTestingExtensionLoader::GetBaseCrxFilePath() { 159 const FilePath ExternalTestingExtensionLoader::GetBaseCrxFilePath() {
158 return fake_base_path_; 160 return fake_base_path_;
159 } 161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698