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

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

Issue 2025103003: 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/hid/hid_api.cc ('k') | extensions/browser/api/idle/idle_manager.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.h
diff --git a/extensions/browser/api/idle/idle_manager.h b/extensions/browser/api/idle/idle_manager.h
index 5d1eb71f3a804a9adea142c5f6f81155290e7a39..770dcc06fb911b43e043ac4c977d9ab6738e9596 100644
--- a/extensions/browser/api/idle/idle_manager.h
+++ b/extensions/browser/api/idle/idle_manager.h
@@ -6,6 +6,7 @@
#define EXTENSIONS_BROWSER_API_IDLE_IDLE_MANAGER_H_
#include <map>
+#include <memory>
#include <string>
#include "base/callback_forward.h"
@@ -90,7 +91,8 @@ class IdleManager : public ExtensionRegistryObserver,
void QueryState(int threshold, QueryStateCallback notify);
void SetThreshold(const std::string& extension_id, int threshold);
- static base::StringValue* CreateIdleValue(ui::IdleState idle_state);
+ static std::unique_ptr<base::StringValue> CreateIdleValue(
+ ui::IdleState idle_state);
// Override default event class. Callee assumes ownership. Used for testing.
void SetEventDelegateForTest(std::unique_ptr<EventDelegate> event_delegate);
« no previous file with comments | « extensions/browser/api/hid/hid_api.cc ('k') | extensions/browser/api/idle/idle_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698