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

Unified Diff: extensions/browser/api/idle/idle_manager.cc

Issue 2038613003: Revert of ExtensionFunction: don't pass ownership of base::Value by raw pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/idle/idle_manager.h ('k') | extensions/browser/api/management/management_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/idle/idle_manager.cc
diff --git a/extensions/browser/api/idle/idle_manager.cc b/extensions/browser/api/idle/idle_manager.cc
index 7122b6baa783f808916fc334f4af4f070cc3d986..cecb1e23f8e03e3fc1d74e49792669602b4f173c 100644
--- a/extensions/browser/api/idle/idle_manager.cc
+++ b/extensions/browser/api/idle/idle_manager.cc
@@ -6,7 +6,6 @@
#include <utility>
-#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
#include "content/public/browser/browser_context.h"
#include "extensions/browser/api/idle/idle_api_constants.h"
@@ -181,8 +180,7 @@
}
// static
-std::unique_ptr<base::StringValue> IdleManager::CreateIdleValue(
- ui::IdleState idle_state) {
+base::StringValue* IdleManager::CreateIdleValue(ui::IdleState idle_state) {
const char* description;
if (idle_state == ui::IDLE_STATE_ACTIVE) {
@@ -193,7 +191,7 @@
description = keys::kStateLocked;
}
- return base::MakeUnique<base::StringValue>(description);
+ return new base::StringValue(description);
}
void IdleManager::SetEventDelegateForTest(
« no previous file with comments | « extensions/browser/api/idle/idle_manager.h ('k') | extensions/browser/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698