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

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

Issue 6293006: Allow relative paths to external extension files for some providers, error out for others. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Tested registry install on windows. Created 9 years, 11 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
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_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::FILE));
gfeher 2011/01/14 21:23:17 My understanding is that this will be called on th
Sam Kerner (Chrome) 2011/01/17 20:21:35 Yes, my mistake.
20
21 // By default, relative paths are not allowed.
22 return FilePath();
23 }
24
18 void ExternalExtensionLoader::OwnerShutdown() { 25 void ExternalExtensionLoader::OwnerShutdown() {
19 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 26 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
20 owner_ = NULL; 27 owner_ = NULL;
21 } 28 }
22 29
23 void ExternalExtensionLoader::LoadFinished() { 30 void ExternalExtensionLoader::LoadFinished() {
24 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 31 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
25 running_ = false; 32 running_ = false;
26 if (owner_) { 33 if (owner_) {
27 owner_->SetPrefs(prefs_.release()); 34 owner_->SetPrefs(prefs_.release());
28 } 35 }
29 } 36 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_extension_loader.h ('k') | chrome/browser/extensions/external_extension_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698