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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 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
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 =
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/policy/test/local_policy_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698