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

Side by Side Diff: handler/crash_report_upload_thread.cc

Issue 1483073004: Replace use of .Pass() with crashpad::move(). (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: pass: . Created 5 years 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 | « client/settings.cc ('k') | handler/handler_main.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 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 10 matching lines...) Expand all
21 #include <vector> 21 #include <vector>
22 22
23 #include "base/logging.h" 23 #include "base/logging.h"
24 #include "base/memory/scoped_ptr.h" 24 #include "base/memory/scoped_ptr.h"
25 #include "base/strings/utf_string_conversions.h" 25 #include "base/strings/utf_string_conversions.h"
26 #include "build/build_config.h" 26 #include "build/build_config.h"
27 #include "client/settings.h" 27 #include "client/settings.h"
28 #include "snapshot/minidump/process_snapshot_minidump.h" 28 #include "snapshot/minidump/process_snapshot_minidump.h"
29 #include "snapshot/module_snapshot.h" 29 #include "snapshot/module_snapshot.h"
30 #include "util/file/file_reader.h" 30 #include "util/file/file_reader.h"
31 #include "util/stdlib/move.h"
31 #include "util/misc/uuid.h" 32 #include "util/misc/uuid.h"
32 #include "util/net/http_body.h" 33 #include "util/net/http_body.h"
33 #include "util/net/http_multipart_builder.h" 34 #include "util/net/http_multipart_builder.h"
34 #include "util/net/http_transport.h" 35 #include "util/net/http_transport.h"
35 #include "util/stdlib/map_insert.h" 36 #include "util/stdlib/map_insert.h"
36 #include "util/thread/thread.h" 37 #include "util/thread/thread.h"
37 38
38 namespace crashpad { 39 namespace crashpad {
39 40
40 namespace { 41 namespace {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 report->file_path.BaseName().value(), 360 report->file_path.BaseName().value(),
360 #endif 361 #endif
361 report->file_path, 362 report->file_path,
362 "application/octet-stream"); 363 "application/octet-stream");
363 364
364 scoped_ptr<HTTPTransport> http_transport(HTTPTransport::Create()); 365 scoped_ptr<HTTPTransport> http_transport(HTTPTransport::Create());
365 http_transport->SetURL(url_); 366 http_transport->SetURL(url_);
366 HTTPHeaders::value_type content_type = 367 HTTPHeaders::value_type content_type =
367 http_multipart_builder.GetContentType(); 368 http_multipart_builder.GetContentType();
368 http_transport->SetHeader(content_type.first, content_type.second); 369 http_transport->SetHeader(content_type.first, content_type.second);
369 http_transport->SetBodyStream(http_multipart_builder.GetBodyStream().Pass()); 370 http_transport->SetBodyStream(http_multipart_builder.GetBodyStream());
370 // TODO(mark): The timeout should be configurable by the client. 371 // TODO(mark): The timeout should be configurable by the client.
371 http_transport->SetTimeout(60.0); // 1 minute. 372 http_transport->SetTimeout(60.0); // 1 minute.
372 373
373 if (!http_transport->ExecuteSynchronously(response_body)) { 374 if (!http_transport->ExecuteSynchronously(response_body)) {
374 return UploadResult::kRetry; 375 return UploadResult::kRetry;
375 } 376 }
376 377
377 return UploadResult::kSuccess; 378 return UploadResult::kSuccess;
378 } 379 }
379 380
380 } // namespace crashpad 381 } // namespace crashpad
OLDNEW
« no previous file with comments | « client/settings.cc ('k') | handler/handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698