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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Prepare the origin's root directory. 51 // Prepare the origin's root directory.
52 if (src_type_ == kFileSystemTypeNativeMedia) { 52 if (src_type_ == kFileSystemTypeNativeMedia) {
53 base::FilePath src_path = base_dir.Append(FILE_PATH_LITERAL("src_media")); 53 base::FilePath src_path = base_dir.Append(FILE_PATH_LITERAL("src_media"));
54 file_util::CreateDirectory(src_path); 54 file_util::CreateDirectory(src_path);
55 src_fsid_ = IsolatedContext::GetInstance()->RegisterFileSystemForPath( 55 src_fsid_ = IsolatedContext::GetInstance()->RegisterFileSystemForPath(
56 kFileSystemTypeNativeMedia, src_path, NULL); 56 kFileSystemTypeNativeMedia, src_path, NULL);
57 } else { 57 } else {
58 FileSystemMountPointProvider* mount_point_provider = 58 FileSystemMountPointProvider* mount_point_provider =
59 file_system_context_->GetMountPointProvider(src_type_); 59 file_system_context_->GetMountPointProvider(src_type_);
60 mount_point_provider->GetFileSystemRootPathOnFileThread( 60 mount_point_provider->GetFileSystemRootPathOnFileThread(
61 SourceURL(""), 61 SourceURL(std::string()), true /* create */);
62 true /* create */);
63 } 62 }
64 DCHECK_EQ(kFileSystemTypeNativeMedia, dest_type_); 63 DCHECK_EQ(kFileSystemTypeNativeMedia, dest_type_);
65 base::FilePath dest_path = base_dir.Append(FILE_PATH_LITERAL("dest_media")); 64 base::FilePath dest_path = base_dir.Append(FILE_PATH_LITERAL("dest_media"));
66 file_util::CreateDirectory(dest_path); 65 file_util::CreateDirectory(dest_path);
67 dest_fsid_ = IsolatedContext::GetInstance()->RegisterFileSystemForPath( 66 dest_fsid_ = IsolatedContext::GetInstance()->RegisterFileSystemForPath(
68 kFileSystemTypeNativeMedia, dest_path, NULL); 67 kFileSystemTypeNativeMedia, dest_path, NULL);
69 68
70 copy_src_ = SourceURL("copy_src.jpg"); 69 copy_src_ = SourceURL("copy_src.jpg");
71 move_src_ = SourceURL("move_src.jpg"); 70 move_src_ = SourceURL("move_src.jpg");
72 copy_dest_ = DestURL("copy_dest.jpg"); 71 copy_dest_ = DestURL("copy_dest.jpg");
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 268
270 scoped_ptr<CopyOrMoveFileValidatorFactory> accept_factory( 269 scoped_ptr<CopyOrMoveFileValidatorFactory> accept_factory(
271 new TestCopyOrMoveFileValidatorFactory(true /*accept_all*/)); 270 new TestCopyOrMoveFileValidatorFactory(true /*accept_all*/));
272 helper.SetMediaCopyOrMoveFileValidatorFactory(accept_factory.Pass()); 271 helper.SetMediaCopyOrMoveFileValidatorFactory(accept_factory.Pass());
273 272
274 helper.CopyTest(base::PLATFORM_FILE_ERROR_SECURITY); 273 helper.CopyTest(base::PLATFORM_FILE_ERROR_SECURITY);
275 helper.MoveTest(base::PLATFORM_FILE_ERROR_SECURITY); 274 helper.MoveTest(base::PLATFORM_FILE_ERROR_SECURITY);
276 } 275 }
277 276
278 } // namespace fileapi 277 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_update_job_unittest.cc ('k') | webkit/fileapi/external_mount_points_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698