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

Side by Side Diff: webkit/browser/fileapi/test_file_system_backend.cc

Issue 18300006: FileAPI: Factor out getting root URI and FS name parts into each FS backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/browser/fileapi/test_file_system_backend.h" 5 #include "webkit/browser/fileapi/test_file_system_backend.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 bool TestFileSystemBackend::CanHandleType(FileSystemType type) const { 98 bool TestFileSystemBackend::CanHandleType(FileSystemType type) const {
99 return (type == kFileSystemTypeTest); 99 return (type == kFileSystemTypeTest);
100 } 100 }
101 101
102 void TestFileSystemBackend::OpenFileSystem( 102 void TestFileSystemBackend::OpenFileSystem(
103 const GURL& origin_url, 103 const GURL& origin_url,
104 FileSystemType type, 104 FileSystemType type,
105 OpenFileSystemMode mode, 105 OpenFileSystemMode mode,
106 const OpenFileSystemCallback& callback) { 106 const OpenFileSystemCallback& callback) {
107 callback.Run(base::PLATFORM_FILE_OK); 107 callback.Run(GetFileSystemRootURI(origin_url, type),
108 GetFileSystemName(origin_url, type),
109 base::PLATFORM_FILE_OK);
108 } 110 }
109 111
110 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil(FileSystemType type) { 112 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil(FileSystemType type) {
111 DCHECK(local_file_util_.get()); 113 DCHECK(local_file_util_.get());
112 return local_file_util_->sync_file_util(); 114 return local_file_util_->sync_file_util();
113 } 115 }
114 116
115 AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil(FileSystemType type) { 117 AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil(FileSystemType type) {
116 return local_file_util_.get(); 118 return local_file_util_.get();
117 } 119 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 183 }
182 184
183 void TestFileSystemBackend::AddFileChangeObserver( 185 void TestFileSystemBackend::AddFileChangeObserver(
184 FileChangeObserver* observer) { 186 FileChangeObserver* observer) {
185 ChangeObserverList::Source source = change_observers_.source(); 187 ChangeObserverList::Source source = change_observers_.source();
186 source.AddObserver(observer, task_runner_.get()); 188 source.AddObserver(observer, task_runner_.get());
187 change_observers_ = ChangeObserverList(source); 189 change_observers_ = ChangeObserverList(source);
188 } 190 }
189 191
190 } // namespace fileapi 192 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/sandbox_file_system_backend_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698