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

Unified Diff: extensions/browser/api_test_utils.h

Issue 1909773002: Convert //extensions/browser 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_activity_monitor.h ('k') | extensions/browser/api_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api_test_utils.h
diff --git a/extensions/browser/api_test_utils.h b/extensions/browser/api_test_utils.h
index 0a74f82df7499a7242653e4cf62e585f348878ee..81d57a801fc6d4a4f3ea962c71814c31d92c0663 100644
--- a/extensions/browser/api_test_utils.h
+++ b/extensions/browser/api_test_utils.h
@@ -5,10 +5,10 @@
#ifndef EXTENSIONS_BROWSER_API_TEST_UTILS_H_
#define EXTENSIONS_BROWSER_API_TEST_UTILS_H_
+#include <memory>
#include <string>
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "extensions/common/manifest.h"
class UIThreadExtensionFunction;
@@ -30,7 +30,7 @@ class ExtensionFunctionDispatcher;
// TODO(yoz): crbug.com/394840: Remove duplicate functionality in
// chrome/browser/extensions/extension_function_test_utils.h.
//
-// TODO(ckehoe): Accept args as scoped_ptr<base::Value>,
+// TODO(ckehoe): Accept args as std::unique_ptr<base::Value>,
// and migrate existing users to the new API.
namespace api_test_utils {
@@ -38,7 +38,7 @@ enum RunFunctionFlags { NONE = 0, INCLUDE_INCOGNITO = 1 << 0 };
// Parse JSON and return as the specified type, or NULL if the JSON is invalid
// or not the specified type.
-scoped_ptr<base::DictionaryValue> ParseDictionary(const std::string& data);
+std::unique_ptr<base::DictionaryValue> ParseDictionary(const std::string& data);
// Get |key| from |val| as the specified type. If |key| does not exist, or is
// not of the specified type, adds a failure to the current test and returns
@@ -69,12 +69,12 @@ base::Value* RunFunctionWithDelegateAndReturnSingleResult(
UIThreadExtensionFunction* function,
const std::string& args,
content::BrowserContext* context,
- scoped_ptr<ExtensionFunctionDispatcher> dispatcher);
+ std::unique_ptr<ExtensionFunctionDispatcher> dispatcher);
base::Value* RunFunctionWithDelegateAndReturnSingleResult(
UIThreadExtensionFunction* function,
const std::string& args,
content::BrowserContext* context,
- scoped_ptr<ExtensionFunctionDispatcher> dispatcher,
+ std::unique_ptr<ExtensionFunctionDispatcher> dispatcher,
RunFunctionFlags flags);
// RunFunctionWithDelegateAndReturnSingleResult, except with a NULL
@@ -116,12 +116,12 @@ bool RunFunction(UIThreadExtensionFunction* function,
bool RunFunction(UIThreadExtensionFunction* function,
const std::string& args,
content::BrowserContext* context,
- scoped_ptr<ExtensionFunctionDispatcher> dispatcher,
+ std::unique_ptr<ExtensionFunctionDispatcher> dispatcher,
RunFunctionFlags flags);
bool RunFunction(UIThreadExtensionFunction* function,
- scoped_ptr<base::ListValue> args,
+ std::unique_ptr<base::ListValue> args,
content::BrowserContext* context,
- scoped_ptr<ExtensionFunctionDispatcher> dispatcher,
+ std::unique_ptr<ExtensionFunctionDispatcher> dispatcher,
RunFunctionFlags flags);
} // namespace api_test_utils
« no previous file with comments | « extensions/browser/api_activity_monitor.h ('k') | extensions/browser/api_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698