Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / extensions / external_loader.cc
blobc706a436bfdfb4681961029c99713eff3d943963
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
3 // found in the LICENSE file.
5 #include "chrome/browser/extensions/external_loader.h"
7 #include "base/logging.h"
8 #include "base/values.h"
9 #include "chrome/browser/extensions/external_provider_impl.h"
10 #include "content/public/browser/browser_thread.h"
12 using content::BrowserThread;
14 namespace extensions {
16 ExternalLoader::ExternalLoader()
17 : owner_(NULL) {
20 void ExternalLoader::Init(ExternalProviderImpl* owner) {
21 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
22 owner_ = owner;
25 const base::FilePath ExternalLoader::GetBaseCrxFilePath() {
26 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
28 // By default, relative paths are not supported.
29 // Subclasses that wish to support them should override this method.
30 return base::FilePath();
33 void ExternalLoader::OwnerShutdown() {
34 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
35 owner_ = NULL;
38 ExternalLoader::~ExternalLoader() {}
40 void ExternalLoader::LoadFinished() {
41 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
42 if (owner_) {
43 owner_->SetPrefs(prefs_.release());
47 } // namespace extensions