Revert 285173 "Removed InProcessBrowserTest::CleanUpOnMainThread()"
[chromium-blink-merge.git] / chrome / browser / extensions / signin / scoped_gaia_auth_extension.cc
blob49d6fa2be8503e4b9936a46d654461fbfcf9db15
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/extensions/signin/scoped_gaia_auth_extension.h"
7 #include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h"
8 #include "content/public/browser/browser_context.h"
10 ScopedGaiaAuthExtension::ScopedGaiaAuthExtension(
11 content::BrowserContext* context)
12 : browser_context_(context) {
13 extensions::GaiaAuthExtensionLoader* loader =
14 extensions::GaiaAuthExtensionLoader::Get(browser_context_);
15 if (loader)
16 loader->LoadIfNeeded();
19 ScopedGaiaAuthExtension::~ScopedGaiaAuthExtension() {
20 extensions::GaiaAuthExtensionLoader* loader =
21 extensions::GaiaAuthExtensionLoader::Get(browser_context_);
22 if (loader)
23 loader->UnloadIfNeeded();