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

Unified Diff: net/log/net_log.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 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
« no previous file with comments | « net/log/net_log.h ('k') | net/log/net_log_event_type_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/net_log.cc
diff --git a/net/log/net_log.cc b/net/log/net_log.cc
index 93749f933fdf907de39752d1bce9e9c541ceb122..33243d3c3f63c48bafa818b29c4bc31bc05380e8 100644
--- a/net/log/net_log.cc
+++ b/net/log/net_log.cc
@@ -41,6 +41,14 @@ base::Value* SourceEventParametersCallback(
return event_params;
}
+base::Value* NetLogBoolCallback(const char* name,
+ bool value,
+ NetLogCaptureMode /* capture_mode */) {
+ base::DictionaryValue* event_params = new base::DictionaryValue();
+ event_params->SetBoolean(name, value);
+ return event_params;
+}
+
base::Value* NetLogIntegerCallback(const char* name,
int value,
NetLogCaptureMode /* capture_mode */) {
@@ -348,6 +356,11 @@ const char* NetLog::EventPhaseToString(EventPhase phase) {
}
// static
+NetLog::ParametersCallback NetLog::BoolCallback(const char* name, bool value) {
+ return base::Bind(&NetLogBoolCallback, name, value);
+}
+
+// static
NetLog::ParametersCallback NetLog::IntegerCallback(const char* name,
int value) {
return base::Bind(&NetLogIntegerCallback, name, value);
« no previous file with comments | « net/log/net_log.h ('k') | net/log/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698