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

Side by Side Diff: webkit/fileapi/file_system_mount_point_provider_unittest.cc

Issue 9016020: Cleanup FileSystemOperation for preparing for adding FSO-factory method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 11 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 bool GetRootPath(const GURL& origin_url, 232 bool GetRootPath(const GURL& origin_url,
233 fileapi::FileSystemType type, 233 fileapi::FileSystemType type,
234 bool create, 234 bool create,
235 FilePath* root_path) { 235 FilePath* root_path) {
236 FilePath virtual_path = FilePath(); 236 FilePath virtual_path = FilePath();
237 if (type == kFileSystemTypeExternal) 237 if (type == kFileSystemTypeExternal)
238 virtual_path = FilePath(kVirtualPath); 238 virtual_path = FilePath(kVirtualPath);
239 FilePath returned_root_path = 239 FilePath returned_root_path =
240 provider(type)->ValidateFileSystemRootAndGetPathOnFileThread( 240 provider(type)->GetFileSystemRootPathOnFileThread(
241 origin_url, type, virtual_path, create); 241 origin_url, type, virtual_path, create);
242 if (root_path) 242 if (root_path)
243 *root_path = returned_root_path; 243 *root_path = returned_root_path;
244 return !returned_root_path.empty(); 244 return !returned_root_path.empty();
245 } 245 }
246 246
247 FilePath data_path() const { return data_dir_.path(); } 247 FilePath data_path() const { return data_dir_.path(); }
248 FilePath file_system_path() const { 248 FilePath file_system_path() const {
249 return data_dir_.path().Append( 249 return data_dir_.path().Append(
250 SandboxMountPointProvider::kNewFileSystemDirectory); 250 SandboxMountPointProvider::kNewFileSystemDirectory);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 FilePath virtual_unused; 405 FilePath virtual_unused;
406 EXPECT_TRUE(external_provider->GetVirtualPath(FilePath(kMountPoint), 406 EXPECT_TRUE(external_provider->GetVirtualPath(FilePath(kMountPoint),
407 &virtual_unused)); 407 &virtual_unused));
408 external_provider->RemoveMountPoint(FilePath(kMountPoint)); 408 external_provider->RemoveMountPoint(FilePath(kMountPoint));
409 EXPECT_FALSE(external_provider->GetVirtualPath(FilePath(kMountPoint), 409 EXPECT_FALSE(external_provider->GetVirtualPath(FilePath(kMountPoint),
410 &virtual_unused)); 410 &virtual_unused));
411 } 411 }
412 #endif 412 #endif
413 413
414 } // namespace fileapi 414 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_mount_point_provider.h ('k') | webkit/fileapi/file_system_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698