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

Unified Diff: extensions/browser/extension_error_test_util.cc

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/extension_error_test_util.h ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_error_test_util.cc
diff --git a/extensions/browser/extension_error_test_util.cc b/extensions/browser/extension_error_test_util.cc
index 0396d8604aabbad7f451b62afc5fe8e4b8edc842..8f42ec937c89454afa697762f0e99d298f992a45 100644
--- a/extensions/browser/extension_error_test_util.cc
+++ b/extensions/browser/extension_error_test_util.cc
@@ -20,12 +20,12 @@ namespace {
const char kDefaultStackTrace[] = "function_name (https://url.com:1:1)";
}
-scoped_ptr<ExtensionError> CreateNewRuntimeError(
+std::unique_ptr<ExtensionError> CreateNewRuntimeError(
const std::string& extension_id,
const std::string& message,
bool from_incognito) {
StackTrace stack_trace;
- scoped_ptr<StackFrame> frame =
+ std::unique_ptr<StackFrame> frame =
StackFrame::CreateFromText(base::ASCIIToUTF16(kDefaultStackTrace));
CHECK(frame.get());
stack_trace.push_back(*frame);
@@ -35,7 +35,7 @@ scoped_ptr<ExtensionError> CreateNewRuntimeError(
url::kStandardSchemeSeparator +
extension_id);
- return scoped_ptr<ExtensionError>(
+ return std::unique_ptr<ExtensionError>(
new RuntimeError(extension_id, from_incognito, source,
base::UTF8ToUTF16(message), stack_trace,
GURL::EmptyGURL(), // no context url
@@ -44,18 +44,18 @@ scoped_ptr<ExtensionError> CreateNewRuntimeError(
0)); // Render process id
}
-scoped_ptr<ExtensionError> CreateNewRuntimeError(
- const std::string& extension_id, const std::string& message) {
+std::unique_ptr<ExtensionError> CreateNewRuntimeError(
+ const std::string& extension_id,
+ const std::string& message) {
return CreateNewRuntimeError(extension_id, message, false);
}
-scoped_ptr<ExtensionError> CreateNewManifestError(
- const std::string& extension_id, const std::string& message) {
- return scoped_ptr<ExtensionError>(
- new ManifestError(extension_id,
- base::UTF8ToUTF16(message),
- base::string16(),
- base::string16()));
+std::unique_ptr<ExtensionError> CreateNewManifestError(
+ const std::string& extension_id,
+ const std::string& message) {
+ return std::unique_ptr<ExtensionError>(
+ new ManifestError(extension_id, base::UTF8ToUTF16(message),
+ base::string16(), base::string16()));
}
} // namespace error_test_util
« no previous file with comments | « extensions/browser/extension_error_test_util.h ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698