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