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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 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
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 "base/guid.h" 10 #include "base/guid.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 void IdentityGetAuthTokenFunction::OnGetTokenFailure( 120 void IdentityGetAuthTokenFunction::OnGetTokenFailure(
121 const OAuth2TokenService::Request* request, 121 const OAuth2TokenService::Request* request,
122 const GoogleServiceAuthError& error) { 122 const GoogleServiceAuthError& error) {
123 Respond(Error(error.ToString())); 123 Respond(Error(error.ToString()));
124 Release(); // Balanced in Run(). 124 Release(); // Balanced in Run().
125 } 125 }
126 126
127 void IdentityGetAuthTokenFunction::OnMintTokenSuccess( 127 void IdentityGetAuthTokenFunction::OnMintTokenSuccess(
128 const std::string& access_token, 128 const std::string& access_token,
129 int time_to_live) { 129 int time_to_live) {
130 Respond(OneArgument(base::MakeUnique<base::StringValue>(access_token))); 130 Respond(OneArgument(base::MakeUnique<base::Value>(access_token)));
131 Release(); // Balanced in Run(). 131 Release(); // Balanced in Run().
132 } 132 }
133 133
134 void IdentityGetAuthTokenFunction::OnIssueAdviceSuccess( 134 void IdentityGetAuthTokenFunction::OnIssueAdviceSuccess(
135 const IssueAdviceInfo& issue_advice) { 135 const IssueAdviceInfo& issue_advice) {
136 Respond(Error(kErrorUserPermissionRequired)); 136 Respond(Error(kErrorUserPermissionRequired));
137 Release(); // Balanced in Run(). 137 Release(); // Balanced in Run().
138 } 138 }
139 139
140 void IdentityGetAuthTokenFunction::OnMintTokenFailure( 140 void IdentityGetAuthTokenFunction::OnMintTokenFailure(
(...skipping 15 matching lines...) Expand all
156 std::unique_ptr<api::identity::RemoveCachedAuthToken::Params> params( 156 std::unique_ptr<api::identity::RemoveCachedAuthToken::Params> params(
157 api::identity::RemoveCachedAuthToken::Params::Create(*args_)); 157 api::identity::RemoveCachedAuthToken::Params::Create(*args_));
158 EXTENSION_FUNCTION_VALIDATE(params.get()); 158 EXTENSION_FUNCTION_VALIDATE(params.get());
159 // This stub identity API does not maintain a token cache, so there is nothing 159 // This stub identity API does not maintain a token cache, so there is nothing
160 // to remove. 160 // to remove.
161 return RespondNow(NoArguments()); 161 return RespondNow(NoArguments());
162 } 162 }
163 163
164 } // namespace shell 164 } // namespace shell
165 } // namespace extensions 165 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/argument_spec.cc ('k') | headless/lib/browser/devtools_api/domain_type_conversions_h.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698