blob: e64d51a6f4069c0b2d79893f7e4ef577d1b8daa8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/external_loader.h"
#include "base/logging.h"
#include "base/values.h"
#include "chrome/browser/extensions/external_provider_impl.h"
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
namespace extensions {
ExternalLoader::ExternalLoader()
: owner_(NULL),
running_(false) {
}
void ExternalLoader::Init(ExternalProviderImpl* owner) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
owner_ = owner;
}
const base::FilePath ExternalLoader::GetBaseCrxFilePath() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// By default, relative paths are not supported.
// Subclasses that wish to support them should override this method.
return base::FilePath();
}
void ExternalLoader::OwnerShutdown() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
owner_ = NULL;
}
ExternalLoader::~ExternalLoader() {}
void ExternalLoader::LoadFinished() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
running_ = false;
if (owner_) {
owner_->SetPrefs(prefs_.release());
}
}
} // namespace extensions
|