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

Side by Side Diff: chrome/browser/extensions/api/file_handlers/directory_util_unittest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/extensions/api/file_handlers/directory_util.h" 5 #include "chrome/browser/extensions/api/file_handlers/directory_util.h"
6 6
7 #include <memory>
7 #include <set> 8 #include <set>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "chrome/test/base/testing_profile.h" 15 #include "chrome/test/base/testing_profile.h"
16 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
17 #include "content/public/test/test_browser_thread_bundle.h" 17 #include "content/public/test/test_browser_thread_bundle.h"
18 #include "content/public/test/test_utils.h" 18 #include "content/public/test/test_utils.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 namespace extensions { 21 namespace extensions {
22 namespace app_file_handler_util { 22 namespace app_file_handler_util {
23 namespace { 23 namespace {
24 24
25 const char kRandomPath[] = "/random/path"; 25 const char kRandomPath[] = "/random/path";
26 26
27 void OnCollectForEntriesPath( 27 void OnCollectForEntriesPath(
28 std::set<base::FilePath>* output, 28 std::set<base::FilePath>* output,
29 scoped_ptr<std::set<base::FilePath>> path_directory_set) { 29 std::unique_ptr<std::set<base::FilePath>> path_directory_set) {
30 *output = *path_directory_set; 30 *output = *path_directory_set;
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 class IsDirectoryUtilTest : public testing::Test { 35 class IsDirectoryUtilTest : public testing::Test {
36 protected: 36 protected:
37 IsDirectoryUtilTest() {} 37 IsDirectoryUtilTest() {}
38 ~IsDirectoryUtilTest() override {} 38 ~IsDirectoryUtilTest() override {}
39 39
(...skipping 20 matching lines...) Expand all
60 collector.CollectForEntriesPaths( 60 collector.CollectForEntriesPaths(
61 paths, base::Bind(&OnCollectForEntriesPath, &result)); 61 paths, base::Bind(&OnCollectForEntriesPath, &result));
62 content::RunAllBlockingPoolTasksUntilIdle(); 62 content::RunAllBlockingPoolTasksUntilIdle();
63 63
64 ASSERT_EQ(1u, result.size()); 64 ASSERT_EQ(1u, result.size());
65 EXPECT_GT(result.count(dir_path_), 0u); 65 EXPECT_GT(result.count(dir_path_), 0u);
66 } 66 }
67 67
68 } // namespace app_file_handler_util 68 } // namespace app_file_handler_util
69 } // namespace extensions 69 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/file_handlers/directory_util.cc ('k') | chrome/browser/extensions/api/file_handlers/mime_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698