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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 "chrome/browser/chromeos/drive/download_handler.h" 5 #include "chrome/browser/chromeos/drive/download_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (error != FILE_ERROR_OK || 97 if (error != FILE_ERROR_OK ||
98 !base::Move(downloaded_file, dest_path)) 98 !base::Move(downloaded_file, dest_path))
99 return; 99 return;
100 *cache_file_path = dest_path; 100 *cache_file_path = dest_path;
101 } 101 }
102 102
103 // Used to implement CheckForFileExistence(). 103 // Used to implement CheckForFileExistence().
104 void ContinueCheckingForFileExistence( 104 void ContinueCheckingForFileExistence(
105 const content::CheckForFileExistenceCallback& callback, 105 const content::CheckForFileExistenceCallback& callback,
106 FileError error, 106 FileError error,
107 scoped_ptr<ResourceEntry> entry) { 107 std::unique_ptr<ResourceEntry> entry) {
108 callback.Run(error == FILE_ERROR_OK); 108 callback.Run(error == FILE_ERROR_OK);
109 } 109 }
110 110
111 // Returns true if |download| is a Drive download created from data persisted 111 // Returns true if |download| is a Drive download created from data persisted
112 // on the download history DB. 112 // on the download history DB.
113 bool IsPersistedDriveDownload(const base::FilePath& drive_tmp_download_path, 113 bool IsPersistedDriveDownload(const base::FilePath& drive_tmp_download_path,
114 DownloadItem* download) { 114 DownloadItem* download) {
115 if (!drive_tmp_download_path.IsParent(download->GetTargetFilePath())) 115 if (!drive_tmp_download_path.IsParent(download->GetTargetFilePath()))
116 return false; 116 return false;
117 117
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 422
423 DownloadManager* DownloadHandler::GetDownloadManager(void* manager_id) { 423 DownloadManager* DownloadHandler::GetDownloadManager(void* manager_id) {
424 if (manager_id == notifier_->GetManager()) 424 if (manager_id == notifier_->GetManager())
425 return notifier_->GetManager(); 425 return notifier_->GetManager();
426 if (notifier_incognito_ && manager_id == notifier_incognito_->GetManager()) 426 if (notifier_incognito_ && manager_id == notifier_incognito_->GetManager())
427 return notifier_incognito_->GetManager(); 427 return notifier_incognito_->GetManager();
428 return NULL; 428 return NULL;
429 } 429 }
430 430
431 } // namespace drive 431 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/download_handler.h ('k') | chrome/browser/chromeos/drive/download_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698