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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.cc

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
250 Release(); // Balanced in RunImpl. 250 Release(); // Balanced in RunImpl.
251 } 251 }
252 252
253 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure() { 253 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure() {
254 error_ = identity_constants::kInvalidRedirect; 254 error_ = identity_constants::kInvalidRedirect;
255 SendResponse(false); 255 SendResponse(false);
256 Release(); // Balanced in RunImpl. 256 Release(); // Balanced in RunImpl.
257 } 257 }
258 258
259 IdentityAPI::IdentityAPI(Profile* profile) { 259 IdentityAPI::IdentityAPI(Profile* profile) {
260 ManifestHandler::Register(extension_manifest_keys::kOAuth2, 260 (new OAuth2ManifestHandler)->Register();
261 make_linked_ptr(new OAuth2ManifestHandler));
262 } 261 }
263 262
264 IdentityAPI::~IdentityAPI() { 263 IdentityAPI::~IdentityAPI() {
265 } 264 }
266 265
267 static base::LazyInstance<ProfileKeyedAPIFactory<IdentityAPI> > 266 static base::LazyInstance<ProfileKeyedAPIFactory<IdentityAPI> >
268 g_factory = LAZY_INSTANCE_INITIALIZER; 267 g_factory = LAZY_INSTANCE_INITIALIZER;
269 268
270 // static 269 // static
271 ProfileKeyedAPIFactory<IdentityAPI>* IdentityAPI::GetFactoryInstance() { 270 ProfileKeyedAPIFactory<IdentityAPI>* IdentityAPI::GetFactoryInstance() {
272 return &g_factory.Get(); 271 return &g_factory.Get();
273 } 272 }
274 273
275 } // namespace extensions 274 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/icons/icons_api.cc ('k') | chrome/browser/extensions/api/identity/identity_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698