summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-17 22:46:41 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-17 22:46:41 +0000
commit4cc647dc70cbdaa49291ef5088494f991e7f8277 (patch)
treed8bc4795c226bb84504fd52048ba38aafe9a5a31
parentfe522afac00dfb9b736cea828df64ac713d1052a (diff)
downloadchromium_src-4cc647dc70cbdaa49291ef5088494f991e7f8277.zip
chromium_src-4cc647dc70cbdaa49291ef5088494f991e7f8277.tar.gz
chromium_src-4cc647dc70cbdaa49291ef5088494f991e7f8277.tar.bz2
net: Add namespace net to URLRequestStartEventParameters.
BUG=64263 TEST=compiled locally and trybots Review URL: http://codereview.chromium.org/5999002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69588 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/debugger/devtools_netlog_observer.cc2
-rw-r--r--chrome/browser/net/load_timing_observer.cc5
-rw-r--r--chrome/browser/net/load_timing_observer_unittest.cc4
-rw-r--r--chrome/browser/net/passive_log_collector.cc2
-rw-r--r--chrome/browser/net/passive_log_collector_unittest.cc2
-rw-r--r--net/url_request/url_request_netlog_params.cc6
-rw-r--r--net/url_request/url_request_netlog_params.h12
7 files changed, 21 insertions, 12 deletions
diff --git a/chrome/browser/debugger/devtools_netlog_observer.cc b/chrome/browser/debugger/devtools_netlog_observer.cc
index aa4c705..0c2bb3e 100644
--- a/chrome/browser/debugger/devtools_netlog_observer.cc
+++ b/chrome/browser/debugger/devtools_netlog_observer.cc
@@ -48,7 +48,7 @@ void DevToolsNetLogObserver::OnAddEntry(net::NetLog::EventType type,
if (type == net::NetLog::TYPE_URL_REQUEST_START_JOB) {
if (phase != net::NetLog::PHASE_BEGIN)
return;
- int load_flags = static_cast<URLRequestStartEventParameters*>(params)->
+ int load_flags = static_cast<net::URLRequestStartEventParameters*>(params)->
load_flags();
if (!(load_flags & net::LOAD_REPORT_RAW_HEADERS))
return;
diff --git a/chrome/browser/net/load_timing_observer.cc b/chrome/browser/net/load_timing_observer.cc
index 53dab62..ea22ccc 100644
--- a/chrome/browser/net/load_timing_observer.cc
+++ b/chrome/browser/net/load_timing_observer.cc
@@ -127,8 +127,9 @@ void LoadTimingObserver::OnAddURLRequestEntry(
if (type == net::NetLog::TYPE_URL_REQUEST_START_JOB) {
if (is_begin) {
// Only record timing for entries with corresponding flag.
- int load_flags = static_cast<URLRequestStartEventParameters*>(params)->
- load_flags();
+ int load_flags =
+ static_cast<net::URLRequestStartEventParameters*>(params)->
+ load_flags();
if (!(load_flags & net::LOAD_ENABLE_LOAD_TIMING))
return;
diff --git a/chrome/browser/net/load_timing_observer_unittest.cc b/chrome/browser/net/load_timing_observer_unittest.cc
index 091b5c7..43f95dc 100644
--- a/chrome/browser/net/load_timing_observer_unittest.cc
+++ b/chrome/browser/net/load_timing_observer_unittest.cc
@@ -48,8 +48,8 @@ void AddEndEntry(LoadTimingObserver& observer,
void AddStartURLRequestEntries(LoadTimingObserver& observer,
uint32 id,
bool request_timing) {
- scoped_refptr<URLRequestStartEventParameters> params(
- new URLRequestStartEventParameters(
+ scoped_refptr<net::URLRequestStartEventParameters> params(
+ new net::URLRequestStartEventParameters(
GURL(StringPrintf("http://req%d", id)),
"GET",
request_timing ? net::LOAD_ENABLE_LOAD_TIMING : 0,
diff --git a/chrome/browser/net/passive_log_collector.cc b/chrome/browser/net/passive_log_collector.cc
index b325ba8..0d41479 100644
--- a/chrome/browser/net/passive_log_collector.cc
+++ b/chrome/browser/net/passive_log_collector.cc
@@ -130,7 +130,7 @@ std::string PassiveLogCollector::SourceInfo::GetURL() const {
if (entry.phase == net::NetLog::PHASE_BEGIN && entry.params) {
switch (entry.type) {
case net::NetLog::TYPE_URL_REQUEST_START_JOB:
- return static_cast<URLRequestStartEventParameters*>(
+ return static_cast<net::URLRequestStartEventParameters*>(
entry.params.get())->url().possibly_invalid_spec();
case net::NetLog::TYPE_SOCKET_STREAM_CONNECT:
return static_cast<net::NetLogStringParameter*>(
diff --git a/chrome/browser/net/passive_log_collector_unittest.cc b/chrome/browser/net/passive_log_collector_unittest.cc
index fb2a1a2..c948baa 100644
--- a/chrome/browser/net/passive_log_collector_unittest.cc
+++ b/chrome/browser/net/passive_log_collector_unittest.cc
@@ -27,7 +27,7 @@ ChromeNetLog::Entry MakeStartLogEntryWithURL(int source_id,
base::TimeTicks(),
NetLog::Source(kSourceType, source_id),
NetLog::PHASE_BEGIN,
- new URLRequestStartEventParameters(GURL(url), "GET", 0, net::LOW));
+ new net::URLRequestStartEventParameters(GURL(url), "GET", 0, net::LOW));
}
ChromeNetLog::Entry MakeStartLogEntry(int source_id) {
diff --git a/net/url_request/url_request_netlog_params.cc b/net/url_request/url_request_netlog_params.cc
index 56414b1..42076bc 100644
--- a/net/url_request/url_request_netlog_params.cc
+++ b/net/url_request/url_request_netlog_params.cc
@@ -6,11 +6,13 @@
#include "base/values.h"
+namespace net {
+
URLRequestStartEventParameters::URLRequestStartEventParameters(
const GURL& url,
const std::string& method,
int load_flags,
- net::RequestPriority priority)
+ RequestPriority priority)
: url_(url),
method_(method),
load_flags_(load_flags),
@@ -25,3 +27,5 @@ Value* URLRequestStartEventParameters::ToValue() const {
dict->SetInteger("priority", static_cast<int>(priority_));
return dict;
}
+
+} // namespace net
diff --git a/net/url_request/url_request_netlog_params.h b/net/url_request/url_request_netlog_params.h
index e7f5ce0..8b275b9e 100644
--- a/net/url_request/url_request_netlog_params.h
+++ b/net/url_request/url_request_netlog_params.h
@@ -13,13 +13,15 @@
#include "net/base/net_log.h"
#include "net/base/request_priority.h"
-// Holds the parameters to emit to the NetLog when starting a net::URLRequest.
-class URLRequestStartEventParameters : public net::NetLog::EventParameters {
+namespace net {
+
+// Holds the parameters to emit to the NetLog when starting a URLRequest.
+class URLRequestStartEventParameters : public NetLog::EventParameters {
public:
URLRequestStartEventParameters(const GURL& url,
const std::string& method,
int load_flags,
- net::RequestPriority priority);
+ RequestPriority priority);
const GURL& url() const {
return url_;
@@ -35,9 +37,11 @@ class URLRequestStartEventParameters : public net::NetLog::EventParameters {
const GURL url_;
const std::string method_;
const int load_flags_;
- const net::RequestPriority priority_;
+ const RequestPriority priority_;
DISALLOW_COPY_AND_ASSIGN(URLRequestStartEventParameters);
};
+} // namespace net
+
#endif // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_