summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-17 01:21:54 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-17 01:21:54 +0000
commit02338d3748c080be20149745aae40caa1fb5e769 (patch)
treef5cb0d3a079a14d963315a51bb22507783f9dda0
parentd3699727ed22ae21c597cd36f1445a19febe7353 (diff)
downloadchromium_src-02338d3748c080be20149745aae40caa1fb5e769.zip
chromium_src-02338d3748c080be20149745aae40caa1fb5e769.tar.gz
chromium_src-02338d3748c080be20149745aae40caa1fb5e769.tar.bz2
net: Add namespace net to more files.
BUG=64263 TEST=trybots Review URL: http://codereview.chromium.org/5921005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69498 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/url_request/url_request_job.h12
-rw-r--r--net/url_request/url_request_job_manager.cc18
-rw-r--r--net/url_request/url_request_job_manager.h10
-rw-r--r--net/url_request/url_request_job_metrics.cc8
-rw-r--r--net/url_request/url_request_job_metrics.h4
5 files changed, 32 insertions, 20 deletions
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index 0d0f356..6f91c9a9 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -17,20 +17,18 @@
#include "net/base/filter.h"
#include "net/base/load_states.h"
+class URLRequestStatus;
+
namespace net {
+
class AuthChallengeInfo;
class HttpRequestHeaders;
class HttpResponseInfo;
class IOBuffer;
-class UploadData;
class URLRequest;
-class X509Certificate;
-} // namespace net
-
-class URLRequestStatus;
class URLRequestJobMetrics;
-
-namespace net {
+class UploadData;
+class X509Certificate;
class URLRequestJob : public base::RefCounted<URLRequestJob>,
public FilterContext {
diff --git a/net/url_request/url_request_job_manager.cc b/net/url_request/url_request_job_manager.cc
index 45d1f82..c630ba2 100644
--- a/net/url_request/url_request_job_manager.cc
+++ b/net/url_request/url_request_job_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -28,13 +28,15 @@ struct SchemeToFactory {
} // namespace
+namespace net {
+
static const SchemeToFactory kBuiltinFactories[] = {
- { "http", net::URLRequestHttpJob::Factory },
- { "https", net::URLRequestHttpJob::Factory },
- { "file", net::URLRequestFileJob::Factory },
- { "ftp", net::URLRequestFtpJob::Factory },
- { "about", net::URLRequestAboutJob::Factory },
- { "data", net::URLRequestDataJob::Factory },
+ { "http", URLRequestHttpJob::Factory },
+ { "https", URLRequestHttpJob::Factory },
+ { "file", URLRequestFileJob::Factory },
+ { "ftp", URLRequestFtpJob::Factory },
+ { "about", URLRequestAboutJob::Factory },
+ { "data", URLRequestDataJob::Factory },
};
URLRequestJobManager::URLRequestJobManager() : enable_file_access_(false) {
@@ -212,3 +214,5 @@ void URLRequestJobManager::UnregisterRequestInterceptor(
DCHECK(i != interceptors_.end());
interceptors_.erase(i);
}
+
+} // namespace net
diff --git a/net/url_request/url_request_job_manager.h b/net/url_request/url_request_job_manager.h
index 0fb18ba..a0d3c87 100644
--- a/net/url_request/url_request_job_manager.h
+++ b/net/url_request/url_request_job_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H__
-#define NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H__
+#ifndef NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
+#define NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
#pragma once
#include <map>
@@ -16,6 +16,8 @@
template <typename T> struct DefaultSingletonTraits;
+namespace net {
+
// This class is responsible for managing the set of protocol factories and
// request interceptors that determine how an net::URLRequestJob gets created to
// handle an net::URLRequest.
@@ -113,4 +115,6 @@ class URLRequestJobManager {
DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager);
};
-#endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H__
+} // namespace net
+
+#endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
diff --git a/net/url_request/url_request_job_metrics.cc b/net/url_request/url_request_job_metrics.cc
index fcaac74..87ef205 100644
--- a/net/url_request/url_request_job_metrics.cc
+++ b/net/url_request/url_request_job_metrics.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-using base::TimeDelta;
+namespace net {
URLRequestJobMetrics::URLRequestJobMetrics()
: total_bytes_read_(0),
@@ -30,7 +30,7 @@ void URLRequestJobMetrics::AppendText(std::wstring* text) {
text->append(UTF8ToWide(url_->spec()));
}
- TimeDelta elapsed = end_time_ - start_time_;
+ base::TimeDelta elapsed = end_time_ - start_time_;
base::StringAppendF(text,
L"; total bytes read = %ld; read calls = %d; time = %lld ms;",
static_cast<long>(total_bytes_read_),
@@ -42,3 +42,5 @@ void URLRequestJobMetrics::AppendText(std::wstring* text) {
text->append(L" fail.");
}
}
+
+} // namespace net
diff --git a/net/url_request/url_request_job_metrics.h b/net/url_request/url_request_job_metrics.h
index 7736859..15bbaf6 100644
--- a/net/url_request/url_request_job_metrics.h
+++ b/net/url_request/url_request_job_metrics.h
@@ -16,6 +16,8 @@
#include "base/time.h"
#include "googleurl/src/gurl.h"
+namespace net {
+
class URLRequestJobMetrics {
public:
URLRequestJobMetrics();
@@ -47,4 +49,6 @@ class URLRequestJobMetrics {
void AppendText(std::wstring* text);
};
+} // namespace net
+
#endif // NET_URL_REQUEST_URL_REQUEST_JOB_METRICS_H_