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

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

Issue 1547233002: Convert Pass()→std::move() in //google_apis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « google_apis/drive/test_util.cc ('k') | google_apis/gaia/gaia_oauth_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/fake_gaia.h" 5 #include "google_apis/gaia/fake_gaia.h"
6 6
7 #include <utility>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/base_paths.h" 10 #include "base/base_paths.h"
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
12 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
13 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
14 #include "base/json/json_writer.h" 15 #include "base/json/json_writer.h"
15 #include "base/logging.h" 16 #include "base/logging.h"
16 #include "base/memory/linked_ptr.h" 17 #include "base/memory/linked_ptr.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 scoped_ptr<BasicHttpResponse> http_response(new BasicHttpResponse()); 302 scoped_ptr<BasicHttpResponse> http_response(new BasicHttpResponse());
302 RequestHandlerMap::iterator iter = request_handlers_.find(request_path); 303 RequestHandlerMap::iterator iter = request_handlers_.find(request_path);
303 if (iter != request_handlers_.end()) { 304 if (iter != request_handlers_.end()) {
304 LOG(WARNING) << "Serving request " << request_path; 305 LOG(WARNING) << "Serving request " << request_path;
305 iter->second.Run(request, http_response.get()); 306 iter->second.Run(request, http_response.get());
306 } else { 307 } else {
307 LOG(ERROR) << "Unhandled request " << request_path; 308 LOG(ERROR) << "Unhandled request " << request_path;
308 return scoped_ptr<HttpResponse>(); // Request not understood. 309 return scoped_ptr<HttpResponse>(); // Request not understood.
309 } 310 }
310 311
311 return http_response.Pass(); 312 return std::move(http_response);
312 } 313 }
313 314
314 void FakeGaia::IssueOAuthToken(const std::string& auth_token, 315 void FakeGaia::IssueOAuthToken(const std::string& auth_token,
315 const AccessTokenInfo& token_info) { 316 const AccessTokenInfo& token_info) {
316 access_token_info_map_.insert(std::make_pair(auth_token, token_info)); 317 access_token_info_map_.insert(std::make_pair(auth_token, token_info));
317 } 318 }
318 319
319 void FakeGaia::RegisterSamlUser(const std::string& account_id, 320 void FakeGaia::RegisterSamlUser(const std::string& account_id,
320 const GURL& saml_idp) { 321 const GURL& saml_idp) {
321 saml_account_idp_map_[account_id] = saml_idp; 322 saml_account_idp_map_[account_id] = saml_idp;
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 if (token_info) { 794 if (token_info) {
794 base::DictionaryValue response_dict; 795 base::DictionaryValue response_dict;
795 response_dict.SetString("id", GetGaiaIdOfEmail(token_info->email)); 796 response_dict.SetString("id", GetGaiaIdOfEmail(token_info->email));
796 response_dict.SetString("email", token_info->email); 797 response_dict.SetString("email", token_info->email);
797 response_dict.SetString("verified_email", token_info->email); 798 response_dict.SetString("verified_email", token_info->email);
798 FormatJSONResponse(response_dict, http_response); 799 FormatJSONResponse(response_dict, http_response);
799 } else { 800 } else {
800 http_response->set_code(net::HTTP_BAD_REQUEST); 801 http_response->set_code(net::HTTP_BAD_REQUEST);
801 } 802 }
802 } 803 }
OLDNEW
« no previous file with comments | « google_apis/drive/test_util.cc ('k') | google_apis/gaia/gaia_oauth_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698