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

Side by Side Diff: chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc

Issue 23727009: Cleanup: Remove chrome namespace for storage monitor and media galleries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/media_galleries/fileapi/device_media_async_file_util.h" 5 #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
11 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" 11 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h"
12 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" 12 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h"
13 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h" 13 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h"
14 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" 14 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 #include "webkit/browser/fileapi/file_system_operation_context.h" 16 #include "webkit/browser/fileapi/file_system_operation_context.h"
17 #include "webkit/browser/fileapi/file_system_url.h" 17 #include "webkit/browser/fileapi/file_system_url.h"
18 #include "webkit/common/blob/shareable_file_reference.h" 18 #include "webkit/common/blob/shareable_file_reference.h"
19 19
20 using fileapi::FileSystemOperationContext; 20 using fileapi::FileSystemOperationContext;
21 using fileapi::FileSystemURL; 21 using fileapi::FileSystemURL;
22 using webkit_blob::ShareableFileReference; 22 using webkit_blob::ShareableFileReference;
23 23
24 namespace chrome {
25
26 namespace { 24 namespace {
27 25
28 const char kDeviceMediaAsyncFileUtilTempDir[] = "DeviceMediaFileSystem"; 26 const char kDeviceMediaAsyncFileUtilTempDir[] = "DeviceMediaFileSystem";
29 27
30 // Called on the IO thread. 28 // Called on the IO thread.
31 MTPDeviceAsyncDelegate* GetMTPDeviceDelegate(const FileSystemURL& url) { 29 MTPDeviceAsyncDelegate* GetMTPDeviceDelegate(const FileSystemURL& url) {
32 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 30 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
33 return MTPDeviceMapService::GetInstance()->GetMTPDeviceAsyncDelegate( 31 return MTPDeviceMapService::GetInstance()->GetMTPDeviceAsyncDelegate(
34 url.filesystem_id()); 32 url.filesystem_id());
35 } 33 }
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 url.path(), // device file path 330 url.path(), // device file path
333 *snapshot_file_path, 331 *snapshot_file_path,
334 base::Bind(&DeviceMediaAsyncFileUtil::OnDidCreateSnapshotFile, 332 base::Bind(&DeviceMediaAsyncFileUtil::OnDidCreateSnapshotFile,
335 weak_ptr_factory_.GetWeakPtr(), 333 weak_ptr_factory_.GetWeakPtr(),
336 callback, 334 callback,
337 make_scoped_refptr(context->task_runner())), 335 make_scoped_refptr(context->task_runner())),
338 base::Bind(&DeviceMediaAsyncFileUtil::OnCreateSnapshotFileError, 336 base::Bind(&DeviceMediaAsyncFileUtil::OnCreateSnapshotFileError,
339 weak_ptr_factory_.GetWeakPtr(), 337 weak_ptr_factory_.GetWeakPtr(),
340 callback)); 338 callback));
341 } 339 }
342
343 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698