OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "components/storage_monitor/image_capture_device.h" | 5 #import "components/storage_monitor/image_capture_device.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 | 9 |
10 namespace storage_monitor { | 10 namespace storage_monitor { |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 base::File::Error RenameFile(const base::FilePath& downloaded_filename, | 14 base::File::Error RenameFile(const base::FilePath& downloaded_filename, |
15 const base::FilePath& desired_filename) { | 15 const base::FilePath& desired_filename) { |
16 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); | 16 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); |
17 bool success = base::ReplaceFile(downloaded_filename, desired_filename, NULL); | 17 bool success = base::ReplaceFile(downloaded_filename, desired_filename, NULL); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // Shared result value from file-copy closure to tell-listener closure. | 219 // Shared result value from file-copy closure to tell-listener closure. |
220 content::BrowserThread::PostTaskAndReplyWithResult( | 220 content::BrowserThread::PostTaskAndReplyWithResult( |
221 content::BrowserThread::FILE, | 221 content::BrowserThread::FILE, |
222 FROM_HERE, | 222 FROM_HERE, |
223 base::Bind(&storage_monitor::RenameFile, savedPath, saveAsPath), | 223 base::Bind(&storage_monitor::RenameFile, savedPath, saveAsPath), |
224 base::Bind( | 224 base::Bind( |
225 &storage_monitor::ReturnRenameResultToListener, listener_, name)); | 225 &storage_monitor::ReturnRenameResultToListener, listener_, name)); |
226 } | 226 } |
227 | 227 |
228 @end // ImageCaptureDevice | 228 @end // ImageCaptureDevice |
OLD | NEW |