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

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

Issue 16466006: Deprecate media_task_runner() from FileSystemTaskRunners (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 6 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) 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/media_galleries/fileapi/native_media_file_util.h" 5 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.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/string_util.h" 9 #include "base/string_util.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 (base::strncasecmp(base_name.c_str(), 73 (base::strncasecmp(base_name.c_str(),
74 win_vista_recycle_bin_name, 74 win_vista_recycle_bin_name,
75 strlen(win_vista_recycle_bin_name)) == 0)) 75 strlen(win_vista_recycle_bin_name)) == 0))
76 return true; 76 return true;
77 #endif 77 #endif
78 return false; 78 return false;
79 } 79 }
80 80
81 // Returns true if the current thread is capable of doing IO. 81 // Returns true if the current thread is capable of doing IO.
82 bool IsOnTaskRunnerThread(fileapi::FileSystemOperationContext* context) { 82 bool IsOnTaskRunnerThread(fileapi::FileSystemOperationContext* context) {
83 return context->file_system_context()->task_runners()-> 83 return context->task_runner()->RunsTasksOnCurrentThread();
84 media_task_runner()->RunsTasksOnCurrentThread();
85 } 84 }
86 85
87 MediaPathFilter* GetMediaPathFilter( 86 MediaPathFilter* GetMediaPathFilter(
88 fileapi::FileSystemOperationContext* context) { 87 fileapi::FileSystemOperationContext* context) {
89 return context->GetUserValue<MediaPathFilter*>( 88 return context->GetUserValue<MediaPathFilter*>(
90 MediaFileSystemMountPointProvider::kMediaPathFilterKey); 89 MediaFileSystemMountPointProvider::kMediaPathFilterKey);
91 } 90 }
92 91
93 } // namespace 92 } // namespace
94 93
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 &file_ref); 639 &file_ref);
641 if (callback.is_null()) 640 if (callback.is_null())
642 return; 641 return;
643 content::BrowserThread::PostTask( 642 content::BrowserThread::PostTask(
644 content::BrowserThread::IO, 643 content::BrowserThread::IO,
645 FROM_HERE, 644 FROM_HERE,
646 base::Bind(callback, error, file_info, platform_path, file_ref)); 645 base::Bind(callback, error, file_info, platform_path, file_ref));
647 } 646 }
648 647
649 } // namespace chrome 648 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698