OLD | NEW |
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 Loading... |
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 |
OLD | NEW |