Index: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc |
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc |
index 4064afccb310679ad10d9666380a0bc61225a1cb..2cc3ea482ffbcc34fc93e36105c4e1437ff1e76f 100644 |
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc |
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc |
@@ -7,6 +7,7 @@ |
#include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
#include "base/lazy_instance.h" |
+#include "base/memory/ptr_util.h" |
#include "chrome/browser/chrome_notification_types.h" |
#include "chrome/browser/extensions/api/web_navigation/web_navigation_api_constants.h" |
#include "chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h" |
@@ -476,7 +477,7 @@ ExtensionFunction::ResponseAction WebNavigationGetFrameFunction::Run() { |
include_incognito(), nullptr, nullptr, |
&web_contents, nullptr) || |
!web_contents) { |
- return RespondNow(OneArgument(base::Value::CreateNullValue())); |
+ return RespondNow(OneArgument(base::MakeUnique<base::Value>())); |
} |
WebNavigationTabObserver* observer = |
@@ -490,11 +491,11 @@ ExtensionFunction::ResponseAction WebNavigationGetFrameFunction::Run() { |
ExtensionApiFrameIdMap::Get()->GetRenderFrameHostById(web_contents, |
frame_id); |
if (!frame_navigation_state.IsValidFrame(render_frame_host)) |
- return RespondNow(OneArgument(base::Value::CreateNullValue())); |
+ return RespondNow(OneArgument(base::MakeUnique<base::Value>())); |
GURL frame_url = frame_navigation_state.GetUrl(render_frame_host); |
if (!frame_navigation_state.IsValidUrl(frame_url)) |
- return RespondNow(OneArgument(base::Value::CreateNullValue())); |
+ return RespondNow(OneArgument(base::MakeUnique<base::Value>())); |
GetFrame::Results::Details frame_details; |
frame_details.url = frame_url.spec(); |
@@ -516,7 +517,7 @@ ExtensionFunction::ResponseAction WebNavigationGetAllFramesFunction::Run() { |
include_incognito(), nullptr, nullptr, |
&web_contents, nullptr) || |
!web_contents) { |
- return RespondNow(OneArgument(base::Value::CreateNullValue())); |
+ return RespondNow(OneArgument(base::MakeUnique<base::Value>())); |
} |
WebNavigationTabObserver* observer = |