Commit 7e2187f5 authored by Ayu Ishii's avatar Ayu Ishii Committed by Commit Bot

Change TrustedSourcesManager to return unique_ptr instead of raw pointer

Bug: 916176
Change-Id: I3418fdbceea18391bb09e957e4846accf1b28447
Reviewed-on: https://chromium-review.googlesource.com/c/1413072Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626216}
parent 91ad3c28
...@@ -44,7 +44,7 @@ class DownloadPathReservationTrackerTest : public testing::Test { ...@@ -44,7 +44,7 @@ class DownloadPathReservationTrackerTest : public testing::Test {
void SetUp() override; void SetUp() override;
void TearDown() override; void TearDown() override;
MockDownloadItem* CreateDownloadItem(int32_t id); std::unique_ptr<MockDownloadItem> CreateDownloadItem(int32_t id);
base::FilePath GetPathInDownloadsDirectory( base::FilePath GetPathInDownloadsDirectory(
const base::FilePath::CharType* suffix); const base::FilePath::CharType* suffix);
bool IsPathInUse(const base::FilePath& path); bool IsPathInUse(const base::FilePath& path);
...@@ -91,9 +91,9 @@ void DownloadPathReservationTrackerTest::TearDown() { ...@@ -91,9 +91,9 @@ void DownloadPathReservationTrackerTest::TearDown() {
content::RunAllTasksUntilIdle(); content::RunAllTasksUntilIdle();
} }
MockDownloadItem* DownloadPathReservationTrackerTest::CreateDownloadItem( std::unique_ptr<MockDownloadItem>
int32_t id) { DownloadPathReservationTrackerTest::CreateDownloadItem(int32_t id) {
MockDownloadItem* item = new ::testing::StrictMock<MockDownloadItem>; auto item = std::make_unique<::testing::StrictMock<MockDownloadItem>>();
EXPECT_CALL(*item, GetId()) EXPECT_CALL(*item, GetId())
.WillRepeatedly(Return(id)); .WillRepeatedly(Return(id));
EXPECT_CALL(*item, GetTargetFilePath()) EXPECT_CALL(*item, GetTargetFilePath())
...@@ -180,7 +180,7 @@ void SetDownloadItemState(download::MockDownloadItem* download_item, ...@@ -180,7 +180,7 @@ void SetDownloadItemState(download::MockDownloadItem* download_item,
// A basic reservation is acquired and committed. // A basic reservation is acquired and committed.
TEST_F(DownloadPathReservationTrackerTest, BasicReservation) { TEST_F(DownloadPathReservationTrackerTest, BasicReservation) {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
ASSERT_FALSE(IsPathInUse(path)); ASSERT_FALSE(IsPathInUse(path));
...@@ -205,7 +205,7 @@ TEST_F(DownloadPathReservationTrackerTest, BasicReservation) { ...@@ -205,7 +205,7 @@ TEST_F(DownloadPathReservationTrackerTest, BasicReservation) {
// A download that is interrupted should lose its reservation. // A download that is interrupted should lose its reservation.
TEST_F(DownloadPathReservationTrackerTest, InterruptedDownload) { TEST_F(DownloadPathReservationTrackerTest, InterruptedDownload) {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
ASSERT_FALSE(IsPathInUse(path)); ASSERT_FALSE(IsPathInUse(path));
...@@ -229,7 +229,7 @@ TEST_F(DownloadPathReservationTrackerTest, InterruptedDownload) { ...@@ -229,7 +229,7 @@ TEST_F(DownloadPathReservationTrackerTest, InterruptedDownload) {
// A completed download should also lose its reservation. // A completed download should also lose its reservation.
TEST_F(DownloadPathReservationTrackerTest, CompleteDownload) { TEST_F(DownloadPathReservationTrackerTest, CompleteDownload) {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
ASSERT_FALSE(IsPathInUse(path)); ASSERT_FALSE(IsPathInUse(path));
...@@ -257,7 +257,7 @@ TEST_F(DownloadPathReservationTrackerTest, CompleteDownload) { ...@@ -257,7 +257,7 @@ TEST_F(DownloadPathReservationTrackerTest, CompleteDownload) {
// If there are files on the file system, a unique reservation should uniquify // If there are files on the file system, a unique reservation should uniquify
// around it. // around it.
TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles) { TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles) {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
base::FilePath path1( base::FilePath path1(
...@@ -295,7 +295,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles) { ...@@ -295,7 +295,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles) {
// If there are conflicting files on the file system, an overwriting reservation // If there are conflicting files on the file system, an overwriting reservation
// should succeed without altering the target path. // should succeed without altering the target path.
TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles_Overwrite) { TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles_Overwrite) {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
// Create a file at |path|. // Create a file at |path|.
...@@ -322,7 +322,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles_Overwrite) { ...@@ -322,7 +322,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles_Overwrite) {
// If the source is a file:// URL that is in the download directory, then Chrome // If the source is a file:// URL that is in the download directory, then Chrome
// could download the file onto itself. Test that this is flagged by DPRT. // could download the file onto itself. Test that this is flagged by DPRT.
TEST_F(DownloadPathReservationTrackerTest, ConflictWithSource) { TEST_F(DownloadPathReservationTrackerTest, ConflictWithSource) {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
ASSERT_EQ(0, base::WriteFile(path, "", 0)); ASSERT_EQ(0, base::WriteFile(path, "", 0));
...@@ -346,7 +346,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictWithSource) { ...@@ -346,7 +346,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictWithSource) {
// Multiple reservations for the same path should uniquify around each other. // Multiple reservations for the same path should uniquify around each other.
TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) { TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) {
std::unique_ptr<MockDownloadItem> item1(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item1 = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
base::FilePath uniquified_path( base::FilePath uniquified_path(
...@@ -368,7 +368,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) { ...@@ -368,7 +368,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) {
{ {
// Requesting a reservation for the same path with uniquification results in // Requesting a reservation for the same path with uniquification results in
// a uniquified path. // a uniquified path.
std::unique_ptr<MockDownloadItem> item2(CreateDownloadItem(2)); std::unique_ptr<MockDownloadItem> item2 = CreateDownloadItem(2);
base::FilePath reserved_path2; base::FilePath reserved_path2;
CallGetReservedPath(item2.get(), path, create_directory, conflict_action, CallGetReservedPath(item2.get(), path, create_directory, conflict_action,
&reserved_path2, &result); &reserved_path2, &result);
...@@ -384,7 +384,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) { ...@@ -384,7 +384,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) {
{ {
// Since the previous download item was removed, requesting a reservation // Since the previous download item was removed, requesting a reservation
// for the same path should result in the same uniquified path. // for the same path should result in the same uniquified path.
std::unique_ptr<MockDownloadItem> item2(CreateDownloadItem(2)); std::unique_ptr<MockDownloadItem> item2 = CreateDownloadItem(2);
base::FilePath reserved_path2; base::FilePath reserved_path2;
CallGetReservedPath(item2.get(), path, create_directory, conflict_action, CallGetReservedPath(item2.get(), path, create_directory, conflict_action,
&reserved_path2, &result); &reserved_path2, &result);
...@@ -397,7 +397,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) { ...@@ -397,7 +397,7 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) {
// Now acquire an overwriting reservation. We should end up with the same // Now acquire an overwriting reservation. We should end up with the same
// non-uniquified path for both reservations. // non-uniquified path for both reservations.
std::unique_ptr<MockDownloadItem> item3(CreateDownloadItem(2)); std::unique_ptr<MockDownloadItem> item3 = CreateDownloadItem(2);
base::FilePath reserved_path3; base::FilePath reserved_path3;
conflict_action = DownloadPathReservationTracker::OVERWRITE; conflict_action = DownloadPathReservationTracker::OVERWRITE;
CallGetReservedPath(item3.get(), path, create_directory, conflict_action, CallGetReservedPath(item3.get(), path, create_directory, conflict_action,
...@@ -415,8 +415,8 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) { ...@@ -415,8 +415,8 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) {
// Two active downloads shouldn't be able to reserve paths that only differ by // Two active downloads shouldn't be able to reserve paths that only differ by
// case. // case.
TEST_F(DownloadPathReservationTrackerTest, ConflictingCaseReservations) { TEST_F(DownloadPathReservationTrackerTest, ConflictingCaseReservations) {
std::unique_ptr<MockDownloadItem> item1(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item1 = CreateDownloadItem(1);
std::unique_ptr<MockDownloadItem> item2(CreateDownloadItem(2)); std::unique_ptr<MockDownloadItem> item2 = CreateDownloadItem(2);
base::FilePath path_foo = base::FilePath path_foo =
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"));
...@@ -479,7 +479,7 @@ TEST_F(DownloadPathReservationTrackerTest, UnresolvedConflicts) { ...@@ -479,7 +479,7 @@ TEST_F(DownloadPathReservationTrackerTest, UnresolvedConflicts) {
expected_path = expected_path =
path.InsertBeforeExtensionASCII(" - 2019-01-23T163530.020"); path.InsertBeforeExtensionASCII(" - 2019-01-23T163530.020");
} }
items[i].reset(CreateDownloadItem(i)); items[i] = CreateDownloadItem(i);
EXPECT_FALSE(IsPathInUse(expected_path)); EXPECT_FALSE(IsPathInUse(expected_path));
CallGetReservedPath(items[i].get(), path, create_directory, conflict_action, CallGetReservedPath(items[i].get(), path, create_directory, conflict_action,
&reserved_path, &result); &reserved_path, &result);
...@@ -488,8 +488,8 @@ TEST_F(DownloadPathReservationTrackerTest, UnresolvedConflicts) { ...@@ -488,8 +488,8 @@ TEST_F(DownloadPathReservationTrackerTest, UnresolvedConflicts) {
EXPECT_EQ(PathValidationResult::SUCCESS, result); EXPECT_EQ(PathValidationResult::SUCCESS, result);
} }
// The next reservation for |path| will fail to be unique. // The next reservation for |path| will fail to be unique.
std::unique_ptr<MockDownloadItem> item( std::unique_ptr<MockDownloadItem> item =
CreateDownloadItem(DownloadPathReservationTracker::kMaxUniqueFiles + 2)); CreateDownloadItem(DownloadPathReservationTracker::kMaxUniqueFiles + 2);
base::FilePath reserved_path; base::FilePath reserved_path;
PathValidationResult result = PathValidationResult::NAME_TOO_LONG; PathValidationResult result = PathValidationResult::NAME_TOO_LONG;
CallGetReservedPath(item.get(), path, create_directory, conflict_action, CallGetReservedPath(item.get(), path, create_directory, conflict_action,
...@@ -505,7 +505,7 @@ TEST_F(DownloadPathReservationTrackerTest, UnresolvedConflicts) { ...@@ -505,7 +505,7 @@ TEST_F(DownloadPathReservationTrackerTest, UnresolvedConflicts) {
// If the target directory is unwriteable, then callback should be notified that // If the target directory is unwriteable, then callback should be notified that
// verification failed. // verification failed.
TEST_F(DownloadPathReservationTrackerTest, UnwriteableDirectory) { TEST_F(DownloadPathReservationTrackerTest, UnwriteableDirectory) {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
base::FilePath dir(path.DirName()); base::FilePath dir(path.DirName());
...@@ -541,7 +541,7 @@ TEST_F(DownloadPathReservationTrackerTest, CreateDefaultDownloadPath) { ...@@ -541,7 +541,7 @@ TEST_F(DownloadPathReservationTrackerTest, CreateDefaultDownloadPath) {
bool create_directory = false; bool create_directory = false;
{ {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath reserved_path; base::FilePath reserved_path;
PathValidationResult result = PathValidationResult::NAME_TOO_LONG; PathValidationResult result = PathValidationResult::NAME_TOO_LONG;
CallGetReservedPath(item.get(), path, create_directory, conflict_action, CallGetReservedPath(item.get(), path, create_directory, conflict_action,
...@@ -552,7 +552,7 @@ TEST_F(DownloadPathReservationTrackerTest, CreateDefaultDownloadPath) { ...@@ -552,7 +552,7 @@ TEST_F(DownloadPathReservationTrackerTest, CreateDefaultDownloadPath) {
} }
ASSERT_FALSE(IsPathInUse(path)); ASSERT_FALSE(IsPathInUse(path));
{ {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath reserved_path; base::FilePath reserved_path;
PathValidationResult result = PathValidationResult::NAME_TOO_LONG; PathValidationResult result = PathValidationResult::NAME_TOO_LONG;
set_default_download_path(dir); set_default_download_path(dir);
...@@ -568,7 +568,7 @@ TEST_F(DownloadPathReservationTrackerTest, CreateDefaultDownloadPath) { ...@@ -568,7 +568,7 @@ TEST_F(DownloadPathReservationTrackerTest, CreateDefaultDownloadPath) {
// If the target path of the download item changes, the reservation should be // If the target path of the download item changes, the reservation should be
// updated to match. // updated to match.
TEST_F(DownloadPathReservationTrackerTest, UpdatesToTargetPath) { TEST_F(DownloadPathReservationTrackerTest, UpdatesToTargetPath) {
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path( base::FilePath path(
GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt"))); GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
ASSERT_FALSE(IsPathInUse(path)); ASSERT_FALSE(IsPathInUse(path));
...@@ -626,7 +626,7 @@ TEST_F(DownloadPathReservationTrackerTest, BasicTruncation) { ...@@ -626,7 +626,7 @@ TEST_F(DownloadPathReservationTrackerTest, BasicTruncation) {
const size_t max_length = real_max_length - 11; const size_t max_length = real_max_length - 11;
#endif // defined(OS_WIN) #endif // defined(OS_WIN)
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path(GetLongNamePathInDownloadsDirectory( base::FilePath path(GetLongNamePathInDownloadsDirectory(
max_length, FILE_PATH_LITERAL(".txt"))); max_length, FILE_PATH_LITERAL(".txt")));
ASSERT_FALSE(IsPathInUse(path)); ASSERT_FALSE(IsPathInUse(path));
...@@ -657,7 +657,7 @@ TEST_F(DownloadPathReservationTrackerTest, TruncationConflict) { ...@@ -657,7 +657,7 @@ TEST_F(DownloadPathReservationTrackerTest, TruncationConflict) {
const size_t max_length = real_max_length - 11; const size_t max_length = real_max_length - 11;
#endif // defined(OS_WIN) #endif // defined(OS_WIN)
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path(GetLongNamePathInDownloadsDirectory( base::FilePath path(GetLongNamePathInDownloadsDirectory(
max_length, FILE_PATH_LITERAL(".txt"))); max_length, FILE_PATH_LITERAL(".txt")));
base::FilePath path0(GetLongNamePathInDownloadsDirectory( base::FilePath path0(GetLongNamePathInDownloadsDirectory(
...@@ -696,7 +696,7 @@ TEST_F(DownloadPathReservationTrackerTest, TruncationFail) { ...@@ -696,7 +696,7 @@ TEST_F(DownloadPathReservationTrackerTest, TruncationFail) {
const size_t max_length = real_max_length - 11; const size_t max_length = real_max_length - 11;
#endif // defined(OS_WIN) #endif // defined(OS_WIN)
std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1)); std::unique_ptr<MockDownloadItem> item = CreateDownloadItem(1);
base::FilePath path(GetPathInDownloadsDirectory( base::FilePath path(GetPathInDownloadsDirectory(
(FILE_PATH_LITERAL("a.") + (FILE_PATH_LITERAL("a.") +
base::FilePath::StringType(max_length, 'b')).c_str())); base::FilePath::StringType(max_length, 'b')).c_str()));
......
...@@ -305,7 +305,7 @@ DownloadPrefs* DownloadPrefs::FromBrowserContext( ...@@ -305,7 +305,7 @@ DownloadPrefs* DownloadPrefs::FromBrowserContext(
bool DownloadPrefs::IsFromTrustedSource(const download::DownloadItem& item) { bool DownloadPrefs::IsFromTrustedSource(const download::DownloadItem& item) {
if (!trusted_sources_manager_) if (!trusted_sources_manager_)
trusted_sources_manager_.reset(TrustedSourcesManager::Create()); trusted_sources_manager_ = TrustedSourcesManager::Create();
return trusted_sources_manager_->IsFromTrustedSource(item.GetURL()); return trusted_sources_manager_->IsFromTrustedSource(item.GetURL());
} }
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_DOWNLOAD_TRUSTED_SOURCES_MANAGER_H_ #ifndef CHROME_BROWSER_DOWNLOAD_TRUSTED_SOURCES_MANAGER_H_
#define CHROME_BROWSER_DOWNLOAD_TRUSTED_SOURCES_MANAGER_H_ #define CHROME_BROWSER_DOWNLOAD_TRUSTED_SOURCES_MANAGER_H_
#include <memory>
#include "base/macros.h" #include "base/macros.h"
#include "net/proxy_resolution/proxy_bypass_rules.h" #include "net/proxy_resolution/proxy_bypass_rules.h"
...@@ -29,7 +31,7 @@ class TrustedSourcesManager { ...@@ -29,7 +31,7 @@ class TrustedSourcesManager {
// the security zone mapping is used instead to determine whether the source // the security zone mapping is used instead to determine whether the source
// is trusted or not. // is trusted or not.
// //
static TrustedSourcesManager* Create(); static std::unique_ptr<TrustedSourcesManager> Create();
// Returns true if the source of this URL is part of the trusted sources. // Returns true if the source of this URL is part of the trusted sources.
virtual bool IsFromTrustedSource(const GURL& url) const; virtual bool IsFromTrustedSource(const GURL& url) const;
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
#include "chrome/browser/download/trusted_sources_manager.h" #include "chrome/browser/download/trusted_sources_manager.h"
#include "base/memory/ptr_util.h"
// static // static
TrustedSourcesManager* TrustedSourcesManager::Create() { std::unique_ptr<TrustedSourcesManager> TrustedSourcesManager::Create() {
return new TrustedSourcesManager; return base::WrapUnique(new TrustedSourcesManager);
} }
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <wrl/client.h> #include <wrl/client.h>
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -49,6 +50,6 @@ bool TrustedSourcesManagerWin::IsFromTrustedSource(const GURL& url) const { ...@@ -49,6 +50,6 @@ bool TrustedSourcesManagerWin::IsFromTrustedSource(const GURL& url) const {
} // namespace } // namespace
// static // static
TrustedSourcesManager* TrustedSourcesManager::Create() { std::unique_ptr<TrustedSourcesManager> TrustedSourcesManager::Create() {
return new TrustedSourcesManagerWin; return base::WrapUnique(new TrustedSourcesManagerWin);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment