| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/extensions/external_extension_loader.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "base/values.h" | |
| 9 #include "chrome/browser/extensions/external_extension_provider_impl.h" | |
| 10 #include "content/public/browser/browser_thread.h" | |
| 11 | |
| 12 using content::BrowserThread; | |
| 13 | |
| 14 ExternalExtensionLoader::ExternalExtensionLoader() | |
| 15 : owner_(NULL), | |
| 16 running_(false) { | |
| 17 } | |
| 18 | |
| 19 void ExternalExtensionLoader::Init( | |
| 20 ExternalExtensionProviderImpl* owner) { | |
| 21 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 22 owner_ = owner; | |
| 23 } | |
| 24 | |
| 25 const FilePath ExternalExtensionLoader::GetBaseCrxFilePath() { | |
| 26 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 27 | |
| 28 // By default, relative paths are not supported. | |
| 29 // Subclasses that wish to support them should override this method. | |
| 30 return FilePath(); | |
| 31 } | |
| 32 | |
| 33 void ExternalExtensionLoader::OwnerShutdown() { | |
| 34 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 35 owner_ = NULL; | |
| 36 } | |
| 37 | |
| 38 ExternalExtensionLoader::~ExternalExtensionLoader() {} | |
| 39 | |
| 40 void ExternalExtensionLoader::LoadFinished() { | |
| 41 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 42 running_ = false; | |
| 43 if (owner_) { | |
| 44 owner_->SetPrefs(prefs_.release()); | |
| 45 } | |
| 46 } | |
| OLD | NEW |