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

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

Issue 16043006: Rename FileSystemMountPointProvider::ValidateFileSystemRoot to OpenFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <map> 5 #include <map>
6 #include <queue> 6 #include <queue>
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/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 quota_manager_proxy_ = new quota::MockQuotaManagerProxy( 64 quota_manager_proxy_ = new quota::MockQuotaManagerProxy(
65 quota_manager_, 65 quota_manager_,
66 base::MessageLoopProxy::current()); 66 base::MessageLoopProxy::current());
67 file_system_context_ = CreateFileSystemContextForTesting( 67 file_system_context_ = CreateFileSystemContextForTesting(
68 quota_manager_proxy_, 68 quota_manager_proxy_,
69 base_dir); 69 base_dir);
70 70
71 // Prepare the origin's root directory. 71 // Prepare the origin's root directory.
72 FileSystemMountPointProvider* mount_point_provider = 72 FileSystemMountPointProvider* mount_point_provider =
73 file_system_context_->GetMountPointProvider(src_type_); 73 file_system_context_->GetMountPointProvider(src_type_);
74 mount_point_provider->ValidateFileSystemRoot( 74 mount_point_provider->OpenFileSystem(
75 origin_, src_type_, true /* create */, base::Bind(&ExpectOk)); 75 origin_, src_type_,
76 OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
77 base::Bind(&ExpectOk));
76 mount_point_provider = 78 mount_point_provider =
77 file_system_context_->GetMountPointProvider(dest_type_); 79 file_system_context_->GetMountPointProvider(dest_type_);
78 mount_point_provider->ValidateFileSystemRoot( 80 mount_point_provider->OpenFileSystem(
79 origin_, dest_type_, true /* create */, base::Bind(&ExpectOk)); 81 origin_, dest_type_,
82 OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
83 base::Bind(&ExpectOk));
80 base::MessageLoop::current()->RunUntilIdle(); 84 base::MessageLoop::current()->RunUntilIdle();
81 85
82 // Grant relatively big quota initially. 86 // Grant relatively big quota initially.
83 quota_manager_->SetQuota(origin_, 87 quota_manager_->SetQuota(origin_,
84 FileSystemTypeToQuotaStorageType(src_type_), 88 FileSystemTypeToQuotaStorageType(src_type_),
85 1024 * 1024); 89 1024 * 1024);
86 quota_manager_->SetQuota(origin_, 90 quota_manager_->SetQuota(origin_,
87 FileSystemTypeToQuotaStorageType(dest_type_), 91 FileSystemTypeToQuotaStorageType(dest_type_),
88 1024 * 1024); 92 1024 * 1024);
89 } 93 }
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 test::kRegularTestCaseSize); 420 test::kRegularTestCaseSize);
417 421
418 int64 src_new_usage = helper.GetSourceUsage(); 422 int64 src_new_usage = helper.GetSourceUsage();
419 ASSERT_EQ(src_initial_usage, src_new_usage); 423 ASSERT_EQ(src_initial_usage, src_new_usage);
420 424
421 int64 dest_increase = helper.GetDestUsage() - dest_initial_usage; 425 int64 dest_increase = helper.GetDestUsage() - dest_initial_usage;
422 ASSERT_EQ(src_increase, dest_increase); 426 ASSERT_EQ(src_increase, dest_increase);
423 } 427 }
424 428
425 } // namespace fileapi 429 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/isolated_mount_point_provider.cc ('k') | webkit/browser/fileapi/open_file_system_mode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698