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

Unified Diff: chrome/browser/extensions/external_extension_loader.cc

Issue 5742008: Clean up threading model of external extension providers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/external_extension_loader.cc
diff --git a/chrome/browser/extensions/external_extension_loader.cc b/chrome/browser/extensions/external_extension_loader.cc
new file mode 100644
index 0000000000000000000000000000000000000000..79fc78795315f82afd51a7b9e498420d86896cb6
--- /dev/null
+++ b/chrome/browser/extensions/external_extension_loader.cc
@@ -0,0 +1,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());
+ }
+}
« no previous file with comments | « chrome/browser/extensions/external_extension_loader.h ('k') | chrome/browser/extensions/external_extension_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698