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

Side by Side Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc

Issue 2736613002: mediaview: Implement ArcDocumentsProviderWatcherManager. (Closed)
Patch Set: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/arc/fileapi/arc_documents_provider_backend_del egate.h" 5 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_del egate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_file_stream _reader.h" 11 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_file_stream _reader.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "storage/browser/fileapi/file_stream_reader.h" 13 #include "storage/browser/fileapi/file_stream_reader.h"
14 #include "storage/browser/fileapi/file_stream_writer.h" 14 #include "storage/browser/fileapi/file_stream_writer.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 using content::BrowserThread; 17 using content::BrowserThread;
18 18
19 namespace arc { 19 namespace arc {
20 20
21 ArcDocumentsProviderBackendDelegate::ArcDocumentsProviderBackendDelegate() 21 ArcDocumentsProviderBackendDelegate::ArcDocumentsProviderBackendDelegate()
22 : async_file_util_(&roots_) {} 22 : async_file_util_(&roots_), watcher_manager_(&roots_) {}
23 23
24 ArcDocumentsProviderBackendDelegate::~ArcDocumentsProviderBackendDelegate() { 24 ArcDocumentsProviderBackendDelegate::~ArcDocumentsProviderBackendDelegate() {
25 DCHECK_CURRENTLY_ON(BrowserThread::IO); 25 DCHECK_CURRENTLY_ON(BrowserThread::IO);
26 } 26 }
27 27
28 storage::AsyncFileUtil* ArcDocumentsProviderBackendDelegate::GetAsyncFileUtil( 28 storage::AsyncFileUtil* ArcDocumentsProviderBackendDelegate::GetAsyncFileUtil(
29 storage::FileSystemType type) { 29 storage::FileSystemType type) {
30 DCHECK_CURRENTLY_ON(BrowserThread::IO); 30 DCHECK_CURRENTLY_ON(BrowserThread::IO);
31 return &async_file_util_; 31 return &async_file_util_;
32 } 32 }
(...skipping 17 matching lines...) Expand all
50 int64_t offset, 50 int64_t offset,
51 storage::FileSystemContext* context) { 51 storage::FileSystemContext* context) {
52 DCHECK_CURRENTLY_ON(BrowserThread::IO); 52 DCHECK_CURRENTLY_ON(BrowserThread::IO);
53 NOTREACHED(); // Read-only file system. 53 NOTREACHED(); // Read-only file system.
54 return nullptr; 54 return nullptr;
55 } 55 }
56 56
57 storage::WatcherManager* ArcDocumentsProviderBackendDelegate::GetWatcherManager( 57 storage::WatcherManager* ArcDocumentsProviderBackendDelegate::GetWatcherManager(
58 storage::FileSystemType type) { 58 storage::FileSystemType type) {
59 DCHECK_CURRENTLY_ON(BrowserThread::IO); 59 DCHECK_CURRENTLY_ON(BrowserThread::IO);
60 NOTREACHED(); // Non-watchable file system. 60 return &watcher_manager_;
61 return nullptr;
62 } 61 }
63 62
64 void ArcDocumentsProviderBackendDelegate::GetRedirectURLForContents( 63 void ArcDocumentsProviderBackendDelegate::GetRedirectURLForContents(
65 const storage::FileSystemURL& url, 64 const storage::FileSystemURL& url,
66 const storage::URLCallback& callback) { 65 const storage::URLCallback& callback) {
67 DCHECK_CURRENTLY_ON(BrowserThread::IO); 66 DCHECK_CURRENTLY_ON(BrowserThread::IO);
68 NOTREACHED(); // Never called by chromeos::FileSystemBackend. 67 NOTREACHED(); // Never called by chromeos::FileSystemBackend.
69 callback.Run(GURL()); 68 callback.Run(GURL());
70 } 69 }
71 70
72 } // namespace arc 71 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698