summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/external_extension_loader.cc
blob: 79fc78795315f82afd51a7b9e498420d86896cb6 (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
// Copyright (c) 2011 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_extension_loader.h"

#include "base/logging.h"
#include "base/values.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/extensions/external_extension_provider_impl.h"

void ExternalExtensionLoader::Init(
    ExternalExtensionProviderImpl* owner) {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  owner_ = owner;
}

void ExternalExtensionLoader::OwnerShutdown() {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  owner_ = NULL;
}

void ExternalExtensionLoader::LoadFinished() {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  running_ = false;
  if (owner_) {
    owner_->SetPrefs(prefs_.release());
  }
}