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

Side by Side Diff: cloud_print/gcp20/prototype/cloud_print_request.cc

Issue 1552613003: Remove needless move() calls in cloud_print/gcp20 (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 | « no previous file | cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cloud_print/gcp20/prototype/cloud_print_request.h" 5 #include "cloud_print/gcp20/prototype/cloud_print_request.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 scoped_ptr<CloudPrintRequest> CloudPrintRequest::CreatePost( 52 scoped_ptr<CloudPrintRequest> CloudPrintRequest::CreatePost(
53 const GURL& url, 53 const GURL& url,
54 const std::string& content, 54 const std::string& content,
55 const std::string& mimetype, 55 const std::string& mimetype,
56 Delegate* delegate) { 56 Delegate* delegate) {
57 scoped_ptr<CloudPrintRequest> request( 57 scoped_ptr<CloudPrintRequest> request(
58 new CloudPrintRequest(url, URLFetcher::POST, delegate)); 58 new CloudPrintRequest(url, URLFetcher::POST, delegate));
59 request->fetcher_->SetUploadData(mimetype, content); 59 request->fetcher_->SetUploadData(mimetype, content);
60 return std::move(request); 60 return request;
61 } 61 }
62 62
63 void CloudPrintRequest::Run( 63 void CloudPrintRequest::Run(
64 const std::string& access_token, 64 const std::string& access_token,
65 scoped_refptr<net::URLRequestContextGetter> context_getter) { 65 scoped_refptr<net::URLRequestContextGetter> context_getter) {
66 if (!access_token.empty()) 66 if (!access_token.empty())
67 fetcher_->AddExtraRequestHeader(base::StringPrintf( 67 fetcher_->AddExtraRequestHeader(base::StringPrintf(
68 "Authorization: Bearer \"%s\"", access_token.c_str())); 68 "Authorization: Bearer \"%s\"", access_token.c_str()));
69 69
70 fetcher_->SetRequestContext(context_getter.get()); 70 fetcher_->SetRequestContext(context_getter.get());
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // TODO(maksymb): Add Privet |server_http_code| and |server_api| support in 111 // TODO(maksymb): Add Privet |server_http_code| and |server_api| support in
112 // case of server errors. 112 // case of server errors.
113 NOTIMPLEMENTED() << "HTTP code: " << http_code; 113 NOTIMPLEMENTED() << "HTTP code: " << http_code;
114 delegate_->OnFetchError("dummy", -1, http_code); // After this object can 114 delegate_->OnFetchError("dummy", -1, http_code); // After this object can
115 // be deleted. 115 // be deleted.
116 // Do *NOT* access members 116 // Do *NOT* access members
117 // after this call. 117 // after this call.
118 } 118 }
119 } 119 }
120 120
OLDNEW
« no previous file with comments | « no previous file | cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698