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

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

Issue 2256173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace a WrapUnique() nested inside a MakeUnique() Created 4 years, 3 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
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 continue; 246 continue;
247 } 247 }
248 base::FilePath relative = GetRelativeVirtualPath(root2, url2); 248 base::FilePath relative = GetRelativeVirtualPath(root2, url2);
249 EXPECT_TRUE(file_set1.find(relative) != file_set1.end()); 249 EXPECT_TRUE(file_set1.find(relative) != file_set1.end());
250 VerifyFilesHaveSameContent(url1, url2); 250 VerifyFilesHaveSameContent(url1, url2);
251 } 251 }
252 } 252 }
253 } 253 }
254 254
255 std::unique_ptr<storage::FileSystemOperationContext> GetOperationContext() { 255 std::unique_ptr<storage::FileSystemOperationContext> GetOperationContext() {
256 return base::WrapUnique( 256 return base::MakeUnique<storage::FileSystemOperationContext>(
257 new storage::FileSystemOperationContext(file_system_context())); 257 file_system_context());
258 } 258 }
259 259
260 260
261 private: 261 private:
262 void SimulateDropFiles() { 262 void SimulateDropFiles() {
263 size_t root_path_index = 0; 263 size_t root_path_index = 0;
264 264
265 storage::IsolatedContext::FileInfoSet toplevels; 265 storage::IsolatedContext::FileInfoSet toplevels;
266 for (size_t i = 0; i < kRegularFileSystemTestCaseSize; ++i) { 266 for (size_t i = 0; i < kRegularFileSystemTestCaseSize; ++i) {
267 const FileSystemTestCaseRecord& test_case = 267 const FileSystemTestCaseRecord& test_case =
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 EXPECT_EQ(base::File::FILE_OK, 548 EXPECT_EQ(base::File::FILE_OK,
549 file_util()->Truncate(GetOperationContext().get(), url, 999)); 549 file_util()->Truncate(GetOperationContext().get(), url, 999));
550 ASSERT_EQ(base::File::FILE_OK, 550 ASSERT_EQ(base::File::FILE_OK,
551 file_util()->GetFileInfo(GetOperationContext().get(), url, 551 file_util()->GetFileInfo(GetOperationContext().get(), url,
552 &info, &platform_path)); 552 &info, &platform_path));
553 EXPECT_EQ(999, info.size); 553 EXPECT_EQ(999, info.size);
554 } 554 }
555 } 555 }
556 556
557 } // namespace content 557 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_request_core.cc ('k') | content/browser/fileapi/transient_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698