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

Side by Side Diff: chrome/browser/media_galleries/scoped_mtp_device_map_entry.cc

Issue 15994002: Move more browser-specific webkit/fileapi code to webkit/browser/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/scoped_mtp_device_map_entry.h" 5 #include "chrome/browser/media_galleries/scoped_mtp_device_map_entry.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h" 9 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h"
10 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" 10 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "webkit/fileapi/file_system_task_runners.h" 12 #include "webkit/browser/fileapi/file_system_task_runners.h"
13 13
14 namespace chrome { 14 namespace chrome {
15 15
16 namespace { 16 namespace {
17 17
18 bool IsMediaTaskRunnerThread() { 18 bool IsMediaTaskRunnerThread() {
19 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); 19 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool();
20 base::SequencedWorkerPool::SequenceToken media_sequence_token = 20 base::SequencedWorkerPool::SequenceToken media_sequence_token =
21 pool->GetNamedSequenceToken(fileapi::kMediaTaskRunnerName); 21 pool->GetNamedSequenceToken(fileapi::kMediaTaskRunnerName);
22 return pool->IsRunningSequenceOnCurrentThread(media_sequence_token); 22 return pool->IsRunningSequenceOnCurrentThread(media_sequence_token);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 void ScopedMTPDeviceMapEntry::OnMTPDeviceAsyncDelegateCreated( 73 void ScopedMTPDeviceMapEntry::OnMTPDeviceAsyncDelegateCreated(
74 MTPDeviceAsyncDelegate* delegate) { 74 MTPDeviceAsyncDelegate* delegate) {
75 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 75 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
76 MTPDeviceMapService::GetInstance()->AddAsyncDelegate( 76 MTPDeviceMapService::GetInstance()->AddAsyncDelegate(
77 device_location_, delegate); 77 device_location_, delegate);
78 } 78 }
79 79
80 } // namespace chrome 80 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698