| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/api/identity/identity_api.h" | 5 #include "chrome/browser/extensions/api/identity/identity_api.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 10 #include "chrome/browser/extensions/extension_install_prompt.h" | 10 #include "chrome/browser/extensions/extension_install_prompt.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 } | 250 } |
| 251 | 251 |
| 252 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure() { | 252 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure() { |
| 253 error_ = identity_constants::kInvalidRedirect; | 253 error_ = identity_constants::kInvalidRedirect; |
| 254 SendResponse(false); | 254 SendResponse(false); |
| 255 Release(); // Balanced in RunImpl. | 255 Release(); // Balanced in RunImpl. |
| 256 } | 256 } |
| 257 | 257 |
| 258 IdentityAPI::IdentityAPI(Profile* profile) { | 258 IdentityAPI::IdentityAPI(Profile* profile) { |
| 259 ManifestHandler::Register(extension_manifest_keys::kOAuth2, | 259 ManifestHandler::Register(extension_manifest_keys::kOAuth2, |
| 260 new OAuth2ManifestHandler); | 260 make_linked_ptr(new OAuth2ManifestHandler)); |
| 261 } | 261 } |
| 262 | 262 |
| 263 IdentityAPI::~IdentityAPI() { | 263 IdentityAPI::~IdentityAPI() { |
| 264 } | 264 } |
| 265 | 265 |
| 266 static base::LazyInstance<ProfileKeyedAPIFactory<IdentityAPI> > | 266 static base::LazyInstance<ProfileKeyedAPIFactory<IdentityAPI> > |
| 267 g_factory = LAZY_INSTANCE_INITIALIZER; | 267 g_factory = LAZY_INSTANCE_INITIALIZER; |
| 268 | 268 |
| 269 // static | 269 // static |
| 270 ProfileKeyedAPIFactory<IdentityAPI>* IdentityAPI::GetFactoryInstance() { | 270 ProfileKeyedAPIFactory<IdentityAPI>* IdentityAPI::GetFactoryInstance() { |
| 271 return &g_factory.Get(); | 271 return &g_factory.Get(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 } // namespace extensions | 274 } // namespace extensions |
| OLD | NEW |