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

Unified Diff: extensions/browser/api/storage/storage_api_unittest.cc

Issue 1902873002: Convert //extensions/browser/api from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/storage/storage_api.cc ('k') | extensions/browser/api/storage/storage_frontend.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/storage/storage_api_unittest.cc
diff --git a/extensions/browser/api/storage/storage_api_unittest.cc b/extensions/browser/api/storage/storage_api_unittest.cc
index 4a013db42a060eb6e2af232a00dacdfd38b78d70..5fe71591e61e1de400df386db2c4beae81801c99 100644
--- a/extensions/browser/api/storage/storage_api_unittest.cc
+++ b/extensions/browser/api/storage/storage_api_unittest.cc
@@ -2,16 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "extensions/browser/api/storage/storage_api.h"
+
+#include <memory>
+
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/stringprintf.h"
#include "content/public/test/test_browser_context.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/api/storage/settings_storage_quota_enforcer.h"
#include "extensions/browser/api/storage/settings_test_util.h"
-#include "extensions/browser/api/storage/storage_api.h"
#include "extensions/browser/api/storage/storage_frontend.h"
#include "extensions/browser/api_unittest.h"
#include "extensions/browser/event_router.h"
@@ -30,15 +33,16 @@ namespace extensions {
namespace {
// Caller owns the returned object.
-scoped_ptr<KeyedService> CreateStorageFrontendForTesting(
+std::unique_ptr<KeyedService> CreateStorageFrontendForTesting(
content::BrowserContext* context) {
scoped_refptr<ValueStoreFactory> factory =
new ValueStoreFactoryImpl(context->GetPath());
return StorageFrontend::CreateForTesting(factory, context);
}
-scoped_ptr<KeyedService> BuildEventRouter(content::BrowserContext* context) {
- return make_scoped_ptr(new extensions::EventRouter(context, nullptr));
+std::unique_ptr<KeyedService> BuildEventRouter(
+ content::BrowserContext* context) {
+ return base::WrapUnique(new extensions::EventRouter(context, nullptr));
}
} // namespace
@@ -61,7 +65,7 @@ class StorageApiUnittest : public ApiUnitTest {
// |value| with the string result.
testing::AssertionResult RunGetFunction(const std::string& key,
std::string* value) {
- scoped_ptr<base::Value> result = RunFunctionAndReturnValue(
+ std::unique_ptr<base::Value> result = RunFunctionAndReturnValue(
new StorageStorageAreaGetFunction(),
base::StringPrintf("[\"local\", \"%s\"]", key.c_str()));
if (!result.get())
« no previous file with comments | « extensions/browser/api/storage/storage_api.cc ('k') | extensions/browser/api/storage/storage_frontend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698