| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/signin/scoped_gaia_auth_extension.h" | 5 #include "chrome/browser/extensions/signin/scoped_gaia_auth_extension.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h" | 7 #include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h" |
| 8 #include "content/public/browser/browser_context.h" |
| 8 | 9 |
| 9 ScopedGaiaAuthExtension::ScopedGaiaAuthExtension(Profile* profile) | 10 ScopedGaiaAuthExtension::ScopedGaiaAuthExtension( |
| 10 : profile_(profile) { | 11 content::BrowserContext* context) |
| 12 : browser_context_(context) { |
| 11 extensions::GaiaAuthExtensionLoader* loader = | 13 extensions::GaiaAuthExtensionLoader* loader = |
| 12 extensions::GaiaAuthExtensionLoader::Get(profile_); | 14 extensions::GaiaAuthExtensionLoader::Get(browser_context_); |
| 13 if (loader) | 15 if (loader) |
| 14 loader->LoadIfNeeded(); | 16 loader->LoadIfNeeded(); |
| 15 } | 17 } |
| 16 | 18 |
| 17 ScopedGaiaAuthExtension::~ScopedGaiaAuthExtension() { | 19 ScopedGaiaAuthExtension::~ScopedGaiaAuthExtension() { |
| 18 extensions::GaiaAuthExtensionLoader* loader = | 20 extensions::GaiaAuthExtensionLoader* loader = |
| 19 extensions::GaiaAuthExtensionLoader::Get(profile_); | 21 extensions::GaiaAuthExtensionLoader::Get(browser_context_); |
| 20 if (loader) | 22 if (loader) |
| 21 loader->UnloadIfNeeded(); | 23 loader->UnloadIfNeeded(); |
| 22 } | 24 } |
| OLD | NEW |