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

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

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/fileapi/file_system_path_manager.h" 5 #include "webkit/fileapi/file_system_path_manager.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 root_path_callback_status_ = false; 233 root_path_callback_status_ = false;
234 root_path_.clear(); 234 root_path_.clear();
235 file_system_name_.clear(); 235 file_system_name_.clear();
236 } 236 }
237 237
238 protected: 238 protected:
239 FileSystemPathManager* NewPathManager( 239 FileSystemPathManager* NewPathManager(
240 bool incognito, 240 bool incognito,
241 bool allow_file_access) { 241 bool allow_file_access) {
242 FileSystemPathManager* manager = new FileSystemPathManager( 242 FileSystemPathManager* manager = new FileSystemPathManager(
243 base::MessageLoopProxy::CreateForCurrentThread(), 243 base::MessageLoopProxy::current(),
244 data_dir_.path(), 244 data_dir_.path(),
245 scoped_refptr<quota::SpecialStoragePolicy>( 245 scoped_refptr<quota::SpecialStoragePolicy>(
246 new TestSpecialStoragePolicy()), 246 new TestSpecialStoragePolicy()),
247 incognito, 247 incognito,
248 allow_file_access); 248 allow_file_access);
249 #if defined(OS_CHROMEOS) 249 #if defined(OS_CHROMEOS)
250 fileapi::ExternalFileSystemMountPointProvider* ext_provider = 250 fileapi::ExternalFileSystemMountPointProvider* ext_provider =
251 manager->external_provider(); 251 manager->external_provider();
252 ext_provider->AddMountPoint(FilePath("/tmp/testing")); 252 ext_provider->AddMountPoint(FilePath("/tmp/testing"));
253 #endif 253 #endif
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) { 433 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) {
434 SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " " 434 SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " "
435 << kIsRestrictedNameTestCases[i].name); 435 << kIsRestrictedNameTestCases[i].name);
436 FilePath name(kIsRestrictedNameTestCases[i].name); 436 FilePath name(kIsRestrictedNameTestCases[i].name);
437 EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous, 437 EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous,
438 manager->IsRestrictedFileName(kFileSystemTypeTemporary, name)); 438 manager->IsRestrictedFileName(kFileSystemTypeTemporary, name));
439 } 439 }
440 } 440 }
441 441
442 } // namespace fileapi 442 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_operation_write_unittest.cc ('k') | webkit/fileapi/file_system_quota_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698