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

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

Issue 263633003: [fsp] Make thread checks consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi le_util.h" 8 #include "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi le_util.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "webkit/browser/blob/file_stream_reader.h" 10 #include "webkit/browser/blob/file_stream_reader.h"
11 #include "webkit/browser/fileapi/file_stream_writer.h" 11 #include "webkit/browser/fileapi/file_stream_writer.h"
12 #include "webkit/browser/fileapi/file_system_url.h" 12 #include "webkit/browser/fileapi/file_system_url.h"
13 13
14 using content::BrowserThread; 14 using content::BrowserThread;
15 15
16 namespace chromeos { 16 namespace chromeos {
17 namespace file_system_provider { 17 namespace file_system_provider {
18 18
19 BackendDelegate::BackendDelegate() 19 BackendDelegate::BackendDelegate()
20 : async_file_util_(new internal::ProviderAsyncFileUtil) {} 20 : async_file_util_(new internal::ProviderAsyncFileUtil) {}
21 21
22 BackendDelegate::~BackendDelegate() {} 22 BackendDelegate::~BackendDelegate() {}
23 23
24 fileapi::AsyncFileUtil* BackendDelegate::GetAsyncFileUtil( 24 fileapi::AsyncFileUtil* BackendDelegate::GetAsyncFileUtil(
25 fileapi::FileSystemType type) { 25 fileapi::FileSystemType type) {
26 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 26 DCHECK_CURRENTLY_ON(BrowserThread::IO);
27 DCHECK_EQ(fileapi::kFileSystemTypeProvided, type); 27 DCHECK_EQ(fileapi::kFileSystemTypeProvided, type);
28 return async_file_util_.get(); 28 return async_file_util_.get();
29 } 29 }
30 30
31 scoped_ptr<webkit_blob::FileStreamReader> 31 scoped_ptr<webkit_blob::FileStreamReader>
32 BackendDelegate::CreateFileStreamReader( 32 BackendDelegate::CreateFileStreamReader(
33 const fileapi::FileSystemURL& url, 33 const fileapi::FileSystemURL& url,
34 int64 offset, 34 int64 offset,
35 const base::Time& expected_modification_time, 35 const base::Time& expected_modification_time,
36 fileapi::FileSystemContext* context) { 36 fileapi::FileSystemContext* context) {
37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 37 DCHECK_CURRENTLY_ON(BrowserThread::IO);
38 DCHECK_EQ(fileapi::kFileSystemTypeProvided, url.type()); 38 DCHECK_EQ(fileapi::kFileSystemTypeProvided, url.type());
39 NOTIMPLEMENTED(); 39 NOTIMPLEMENTED();
40 return scoped_ptr<webkit_blob::FileStreamReader>(); 40 return scoped_ptr<webkit_blob::FileStreamReader>();
41 } 41 }
42 42
43 scoped_ptr<fileapi::FileStreamWriter> BackendDelegate::CreateFileStreamWriter( 43 scoped_ptr<fileapi::FileStreamWriter> BackendDelegate::CreateFileStreamWriter(
44 const fileapi::FileSystemURL& url, 44 const fileapi::FileSystemURL& url,
45 int64 offset, 45 int64 offset,
46 fileapi::FileSystemContext* context) { 46 fileapi::FileSystemContext* context) {
47 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 47 DCHECK_CURRENTLY_ON(BrowserThread::IO);
48 DCHECK_EQ(fileapi::kFileSystemTypeProvided, url.type()); 48 DCHECK_EQ(fileapi::kFileSystemTypeProvided, url.type());
49 NOTIMPLEMENTED(); 49 NOTIMPLEMENTED();
50 return scoped_ptr<fileapi::FileStreamWriter>(); 50 return scoped_ptr<fileapi::FileStreamWriter>();
51 } 51 }
52 52
53 } // namespace file_system_provider 53 } // namespace file_system_provider
54 } // namespace chromeos 54 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698