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

Side by Side Diff: chrome/browser/chromeos/drive/drive_download_observer.cc

Issue 11801022: Allow dragging a download only after the download is complete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk at 175906 Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/download/download_util.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) 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 "chrome/browser/chromeos/drive/drive_download_observer.h" 5 #include "chrome/browser/chromeos/drive/drive_download_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/supports_user_data.h" 9 #include "base/supports_user_data.h"
10 #include "chrome/browser/chromeos/drive/drive.pb.h" 10 #include "chrome/browser/chromeos/drive/drive.pb.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 case DownloadItem::INTERRUPTED: 244 case DownloadItem::INTERRUPTED:
245 download->SetUserData(&kDrivePathKey, NULL); 245 download->SetUserData(&kDrivePathKey, NULL);
246 break; 246 break;
247 247
248 default: 248 default:
249 NOTREACHED(); 249 NOTREACHED();
250 } 250 }
251 } 251 }
252 252
253 void DriveDownloadObserver::UploadDownloadItem(DownloadItem* download) { 253 void DriveDownloadObserver::UploadDownloadItem(DownloadItem* download) {
254 DCHECK(download->IsComplete());
254 file_write_helper_->PrepareWritableFileAndRun( 255 file_write_helper_->PrepareWritableFileAndRun(
255 GetDrivePath(download), 256 GetDrivePath(download),
256 base::Bind(&MoveDownloadedFile, download->GetFullPath())); 257 base::Bind(&MoveDownloadedFile, download->GetTargetFilePath()));
257 } 258 }
258 259
259 } // namespace drive 260 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698