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

Unified Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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/ui/webui/net_internals/net_internals_ui.cc
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 268d5268f124b9b683997defd132f9c5d3ecd31f..21441c4d8579ad0c180b7d6e1c7eccb438da8db7 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -89,7 +89,7 @@
#include "components/user_manager/user.h"
#endif
-using base::StringValue;
+using base::Value;
using content::BrowserThread;
using content::WebContents;
using content::WebUIMessageHandler;
@@ -484,7 +484,7 @@ void NetInternalsMessageHandler::RegisterMessages() {
void NetInternalsMessageHandler::SendJavascriptCommand(
const std::string& command,
std::unique_ptr<base::Value> arg) {
- std::unique_ptr<base::Value> command_value(new base::StringValue(command));
+ std::unique_ptr<base::Value> command_value(new base::Value(command));
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (arg) {
web_ui()->CallJavascriptFunctionUnsafe("g_browser.receive",
@@ -845,7 +845,7 @@ void NetInternalsMessageHandler::ImportONCFileToNSSDB(
if (!user) {
std::string error = "User not found.";
SendJavascriptCommand("receivedONCFileParse",
- base::MakeUnique<base::StringValue>(error));
+ base::MakeUnique<base::Value>(error));
return;
}
@@ -887,7 +887,7 @@ void NetInternalsMessageHandler::OnCertificatesImported(
error += "Some certificates couldn't be imported. ";
SendJavascriptCommand("receivedONCFileParse",
- base::MakeUnique<base::StringValue>(error));
+ base::MakeUnique<base::Value>(error));
}
void NetInternalsMessageHandler::OnImportONCFile(
@@ -909,9 +909,8 @@ void NetInternalsMessageHandler::OnImportONCFile(
void NetInternalsMessageHandler::OnStoreDebugLogs(const base::ListValue* list) {
DCHECK(list);
- SendJavascriptCommand(
- "receivedStoreDebugLogs",
- base::MakeUnique<base::StringValue>("Creating log file..."));
+ SendJavascriptCommand("receivedStoreDebugLogs",
+ base::MakeUnique<base::Value>("Creating log file..."));
Profile* profile = Profile::FromWebUI(web_ui());
const DownloadPrefs* const prefs = DownloadPrefs::FromBrowserContext(profile);
base::FilePath path = prefs->DownloadPath();
@@ -932,7 +931,7 @@ void NetInternalsMessageHandler::OnStoreDebugLogsCompleted(
else
status = "Failed to create log file";
SendJavascriptCommand("receivedStoreDebugLogs",
- base::MakeUnique<base::StringValue>(status));
+ base::MakeUnique<base::Value>(status));
}
void NetInternalsMessageHandler::OnSetNetworkDebugMode(
@@ -956,7 +955,7 @@ void NetInternalsMessageHandler::OnSetNetworkDebugModeCompleted(
: "Failed to change debug mode to ";
status += subsystem;
SendJavascriptCommand("receivedSetNetworkDebugMode",
- base::MakeUnique<base::StringValue>(status));
+ base::MakeUnique<base::Value>(status));
}
#endif // defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698