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

Side by Side Diff: google_apis/gaia/oauth2_mint_token_flow.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 "google_apis/gaia/oauth2_mint_token_flow.h" 5 #include "google_apis/gaia/oauth2_mint_token_flow.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 Mode mode_arg) 82 Mode mode_arg)
83 : login_refresh_token(rt), 83 : login_refresh_token(rt),
84 extension_id(eid), 84 extension_id(eid),
85 client_id(cid), 85 client_id(cid),
86 scopes(scopes_arg), 86 scopes(scopes_arg),
87 mode(mode_arg) { 87 mode(mode_arg) {
88 } 88 }
89 89
90 OAuth2MintTokenFlow::Parameters::~Parameters() {} 90 OAuth2MintTokenFlow::Parameters::~Parameters() {}
91 91
92 OAuth2MintTokenFlow::OAuth2MintTokenFlow( 92 OAuth2MintTokenFlow::OAuth2MintTokenFlow(URLRequestContextGetter* context,
93 URLRequestContextGetter* context, 93 Delegate* delegate,
94 Delegate* delegate, 94 const Parameters& parameters)
95 const Parameters& parameters) 95 : OAuth2ApiCallFlow(context,
96 : OAuth2ApiCallFlow( 96 parameters.login_refresh_token,
97 context, parameters.login_refresh_token, 97 std::string(),
98 "", std::vector<std::string>()), 98 std::vector<std::string>()),
99 delegate_(delegate), 99 delegate_(delegate),
100 parameters_(parameters), 100 parameters_(parameters),
101 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 101 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {}
102 }
103 102
104 OAuth2MintTokenFlow::~OAuth2MintTokenFlow() { } 103 OAuth2MintTokenFlow::~OAuth2MintTokenFlow() { }
105 104
106 void OAuth2MintTokenFlow::ReportSuccess(const std::string& access_token) { 105 void OAuth2MintTokenFlow::ReportSuccess(const std::string& access_token) {
107 if (delegate_) 106 if (delegate_)
108 delegate_->OnMintTokenSuccess(access_token); 107 delegate_->OnMintTokenSuccess(access_token);
109 108
110 // |this| may already be deleted. 109 // |this| may already be deleted.
111 } 110 }
112 111
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 for (size_t i = 0; i < entry.details.size(); i++) 238 for (size_t i = 0; i < entry.details.size(); i++)
240 TrimWhitespace(entry.details[i], TRIM_ALL, &entry.details[i]); 239 TrimWhitespace(entry.details[i], TRIM_ALL, &entry.details[i]);
241 issue_advice->push_back(entry); 240 issue_advice->push_back(entry);
242 } 241 }
243 242
244 if (!success) 243 if (!success)
245 issue_advice->clear(); 244 issue_advice->clear();
246 245
247 return success; 246 return success;
248 } 247 }
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_api_call_flow_unittest.cc ('k') | google_apis/gaia/oauth2_mint_token_flow_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698