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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.cc

Issue 2712613002: Call WatcherManager functions on the IO thread. (Closed)
Patch Set: Addressed hidehiko's comments. Created 3 years, 9 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 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 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate. h" 5 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate. h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_st ream_reader.h" 9 #include "chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_st ream_reader.h"
10 #include "chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_st ream_writer.h" 10 #include "chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_st ream_writer.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 DCHECK_EQ(storage::kFileSystemTypeProvided, url.type()); 72 DCHECK_EQ(storage::kFileSystemTypeProvided, url.type());
73 73
74 return std::unique_ptr<storage::FileStreamWriter>( 74 return std::unique_ptr<storage::FileStreamWriter>(
75 new BufferingFileStreamWriter(std::unique_ptr<storage::FileStreamWriter>( 75 new BufferingFileStreamWriter(std::unique_ptr<storage::FileStreamWriter>(
76 new FileStreamWriter(url, offset)), 76 new FileStreamWriter(url, offset)),
77 kWriterBufferSize)); 77 kWriterBufferSize));
78 } 78 }
79 79
80 storage::WatcherManager* BackendDelegate::GetWatcherManager( 80 storage::WatcherManager* BackendDelegate::GetWatcherManager(
81 storage::FileSystemType type) { 81 storage::FileSystemType type) {
82 DCHECK_CURRENTLY_ON(BrowserThread::UI); 82 DCHECK_CURRENTLY_ON(BrowserThread::IO);
83 DCHECK_EQ(storage::kFileSystemTypeProvided, type); 83 DCHECK_EQ(storage::kFileSystemTypeProvided, type);
84 return watcher_manager_.get(); 84 return watcher_manager_.get();
85 } 85 }
86 86
87 void BackendDelegate::GetRedirectURLForContents( 87 void BackendDelegate::GetRedirectURLForContents(
88 const storage::FileSystemURL& url, 88 const storage::FileSystemURL& url,
89 const storage::URLCallback& callback) { 89 const storage::URLCallback& callback) {
90 DCHECK_CURRENTLY_ON(BrowserThread::IO); 90 DCHECK_CURRENTLY_ON(BrowserThread::IO);
91 DCHECK_EQ(storage::kFileSystemTypeProvided, url.type()); 91 DCHECK_EQ(storage::kFileSystemTypeProvided, url.type());
92 callback.Run(GURL()); 92 callback.Run(GURL());
93 } 93 }
94 94
95 } // namespace file_system_provider 95 } // namespace file_system_provider
96 } // namespace chromeos 96 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698