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

Side by Side Diff: content/browser/fileapi/file_system_context_unittest.cc

Issue 206253002: Revert of Add mechanism to auto mount file systems in response to a URL request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/file_system_context.h" 5 #include "webkit/browser/fileapi/file_system_context.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "content/public/test/test_file_system_options.h" 10 #include "content/public/test/test_file_system_options.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 new quota::MockQuotaManager(false /* is_incognito */, 59 new quota::MockQuotaManager(false /* is_incognito */,
60 data_dir_.path(), 60 data_dir_.path(),
61 base::MessageLoopProxy::current().get(), 61 base::MessageLoopProxy::current().get(),
62 base::MessageLoopProxy::current().get(), 62 base::MessageLoopProxy::current().get(),
63 storage_policy_.get()); 63 storage_policy_.get());
64 } 64 }
65 65
66 protected: 66 protected:
67 FileSystemContext* CreateFileSystemContextForTest( 67 FileSystemContext* CreateFileSystemContextForTest(
68 fileapi::ExternalMountPoints* external_mount_points) { 68 fileapi::ExternalMountPoints* external_mount_points) {
69 return new FileSystemContext( 69 return new FileSystemContext(base::MessageLoopProxy::current().get(),
70 base::MessageLoopProxy::current().get(), 70 base::MessageLoopProxy::current().get(),
71 base::MessageLoopProxy::current().get(), 71 external_mount_points,
72 external_mount_points, 72 storage_policy_.get(),
73 storage_policy_.get(), 73 mock_quota_manager_->proxy(),
74 mock_quota_manager_->proxy(), 74 ScopedVector<FileSystemBackend>(),
75 ScopedVector<FileSystemBackend>(), 75 data_dir_.path(),
76 std::vector<fileapi::URLRequestAutoMountHandler>(), 76 CreateAllowFileAccessOptions());
77 data_dir_.path(),
78 CreateAllowFileAccessOptions());
79 } 77 }
80 78
81 // Verifies a *valid* filesystem url has expected values. 79 // Verifies a *valid* filesystem url has expected values.
82 void ExpectFileSystemURLMatches(const FileSystemURL& url, 80 void ExpectFileSystemURLMatches(const FileSystemURL& url,
83 const GURL& expect_origin, 81 const GURL& expect_origin,
84 FileSystemType expect_mount_type, 82 FileSystemType expect_mount_type,
85 FileSystemType expect_type, 83 FileSystemType expect_type,
86 const base::FilePath& expect_path, 84 const base::FilePath& expect_path,
87 const base::FilePath& expect_virtual_path, 85 const base::FilePath& expect_virtual_path,
88 const std::string& expect_filesystem_id) { 86 const std::string& expect_filesystem_id) {
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 EXPECT_TRUE(context->CanServeURLRequest(cracked_url)); 375 EXPECT_TRUE(context->CanServeURLRequest(cracked_url));
378 376
379 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 377 ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
380 kExternalMountName); 378 kExternalMountName);
381 IsolatedContext::GetInstance()->RevokeFileSystem(isolated_fs_id); 379 IsolatedContext::GetInstance()->RevokeFileSystem(isolated_fs_id);
382 } 380 }
383 381
384 } // namespace 382 } // namespace
385 383
386 } // namespace content 384 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698