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

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

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 years, 7 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 return StartUploadFile( 194 return StartUploadFile(
195 std::unique_ptr<UploadFileInfo>(new UploadFileInfo( 195 std::unique_ptr<UploadFileInfo>(new UploadFileInfo(
196 local_file_path, content_type, callback, progress_callback)), 196 local_file_path, content_type, callback, progress_callback)),
197 base::Bind(&DriveUploader::CallUploadServiceAPINewFile, 197 base::Bind(&DriveUploader::CallUploadServiceAPINewFile,
198 weak_ptr_factory_.GetWeakPtr(), parent_resource_id, title, 198 weak_ptr_factory_.GetWeakPtr(), parent_resource_id, title,
199 options, current_batch_request_)); 199 options, current_batch_request_));
200 } 200 }
201 201
202 void DriveUploader::StartBatchProcessing() { 202 void DriveUploader::StartBatchProcessing() {
203 DCHECK(current_batch_request_ == nullptr); 203 DCHECK(!current_batch_request_);
204 current_batch_request_ = 204 current_batch_request_ =
205 new RefCountedBatchRequest(drive_service_->StartBatchRequest()); 205 new RefCountedBatchRequest(drive_service_->StartBatchRequest());
206 } 206 }
207 207
208 void DriveUploader::StopBatchProcessing() { 208 void DriveUploader::StopBatchProcessing() {
209 current_batch_request_ = nullptr; 209 current_batch_request_ = nullptr;
210 } 210 }
211 211
212 CancelCallback DriveUploader::UploadExistingFile( 212 CancelCallback DriveUploader::UploadExistingFile(
213 const std::string& resource_id, 213 const std::string& resource_id,
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 DVLOG(1) << "Upload failed " << upload_file_info->DebugString(); 528 DVLOG(1) << "Upload failed " << upload_file_info->DebugString();
529 if (error == HTTP_PRECONDITION) 529 if (error == HTTP_PRECONDITION)
530 error = HTTP_CONFLICT; // ETag mismatch. 530 error = HTTP_CONFLICT; // ETag mismatch.
531 upload_file_info->completion_callback.Run(error, 531 upload_file_info->completion_callback.Run(error,
532 upload_file_info->upload_location, 532 upload_file_info->upload_location,
533 std::unique_ptr<FileResource>()); 533 std::unique_ptr<FileResource>());
534 } 534 }
535 } 535 }
536 536
537 } // namespace drive 537 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/password_manager_handler.cc ('k') | components/suggestions/image_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698