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

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

Issue 804673002: app_shell: Extend identity API stub (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unlimited-storage
Patch Set: (identity-stub) rebase Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/api/identity/identity_api.h" 5 #include "extensions/shell/browser/api/identity/identity_api.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "extensions/common/manifest_handlers/oauth2_manifest_handler.h" 10 #include "extensions/common/manifest_handlers/oauth2_manifest_handler.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 Release(); // Balanced in Run(). 65 Release(); // Balanced in Run().
66 } 66 }
67 67
68 void IdentityGetAuthTokenFunction::OnGetTokenFailure( 68 void IdentityGetAuthTokenFunction::OnGetTokenFailure(
69 const OAuth2TokenService::Request* request, 69 const OAuth2TokenService::Request* request,
70 const GoogleServiceAuthError& error) { 70 const GoogleServiceAuthError& error) {
71 Respond(Error(error.ToString())); 71 Respond(Error(error.ToString()));
72 Release(); // Balanced in Run(). 72 Release(); // Balanced in Run().
73 } 73 }
74 74
75 ///////////////////////////////////////////////////////////////////////////////
76
77 IdentityRemoveCachedAuthTokenFunction::IdentityRemoveCachedAuthTokenFunction() {
78 }
79
80 IdentityRemoveCachedAuthTokenFunction::
81 ~IdentityRemoveCachedAuthTokenFunction() {
82 }
83
84 ExtensionFunction::ResponseAction IdentityRemoveCachedAuthTokenFunction::Run() {
85 scoped_ptr<api::identity::RemoveCachedAuthToken::Params> params(
86 api::identity::RemoveCachedAuthToken::Params::Create(*args_));
87 EXTENSION_FUNCTION_VALIDATE(params.get());
88 // This stub identity API does not maintain a token cache, so there is nothing
89 // to remove.
90 return RespondNow(NoArguments());
91 }
92
75 } // namespace shell 93 } // namespace shell
76 } // namespace extensions 94 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/api/identity/identity_api.h ('k') | extensions/shell/browser/api/identity/identity_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698