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

Side by Side Diff: components/drive/drive_uploader.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 (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 "components/drive/drive_uploader.h" 5 #include "components/drive/drive_uploader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 : file_path(local_path), 96 : file_path(local_path),
97 content_type(content_type), 97 content_type(content_type),
98 completion_callback(callback), 98 completion_callback(callback),
99 progress_callback(progress_callback), 99 progress_callback(progress_callback),
100 content_length(0), 100 content_length(0),
101 next_start_position(-1), 101 next_start_position(-1),
102 power_save_blocker(new device::PowerSaveBlocker( 102 power_save_blocker(new device::PowerSaveBlocker(
103 device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, 103 device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
104 device::PowerSaveBlocker::kReasonOther, 104 device::PowerSaveBlocker::kReasonOther,
105 "Upload in progress", 105 "Upload in progress",
106 content::BrowserThread::GetMessageLoopProxyForThread( 106 content::BrowserThread::GetTaskRunnerForThread(
107 content::BrowserThread::UI), 107 content::BrowserThread::UI),
108 content::BrowserThread::GetMessageLoopProxyForThread( 108 content::BrowserThread::GetTaskRunnerForThread(
109 content::BrowserThread::FILE))), 109 content::BrowserThread::FILE))),
110 cancelled(false), 110 cancelled(false),
111 weak_ptr_factory_(this) {} 111 weak_ptr_factory_(this) {}
112 112
113 ~UploadFileInfo() { 113 ~UploadFileInfo() {
114 } 114 }
115 115
116 // Useful for printf debugging. 116 // Useful for printf debugging.
117 std::string DebugString() const { 117 std::string DebugString() const {
118 return "file_path=[" + file_path.AsUTF8Unsafe() + 118 return "file_path=[" + file_path.AsUTF8Unsafe() +
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 DVLOG(1) << "Upload failed " << upload_file_info->DebugString(); 533 DVLOG(1) << "Upload failed " << upload_file_info->DebugString();
534 if (error == HTTP_PRECONDITION) 534 if (error == HTTP_PRECONDITION)
535 error = HTTP_CONFLICT; // ETag mismatch. 535 error = HTTP_CONFLICT; // ETag mismatch.
536 upload_file_info->completion_callback.Run(error, 536 upload_file_info->completion_callback.Run(error,
537 upload_file_info->upload_location, 537 upload_file_info->upload_location,
538 std::unique_ptr<FileResource>()); 538 std::unique_ptr<FileResource>());
539 } 539 }
540 } 540 }
541 541
542 } // namespace drive 542 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698