summaryrefslogtreecommitdiffstats
path: root/net/base/sdch_manager.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-01 03:42:11 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-01 03:42:11 +0000
commitba5734e12bf1b0e31bc10b0451d5ec278b16e0ab (patch)
treea8c1ac6a123f73bac1b816da336c2811f1d14e92 /net/base/sdch_manager.cc
parent3e3e7c7eac9a7cdab9c8795df1307cc6507cb2a4 (diff)
downloadchromium_src-ba5734e12bf1b0e31bc10b0451d5ec278b16e0ab.zip
chromium_src-ba5734e12bf1b0e31bc10b0451d5ec278b16e0ab.tar.gz
chromium_src-ba5734e12bf1b0e31bc10b0451d5ec278b16e0ab.tar.bz2
net: Add namespace net to Sdch* classes.
BUG=64263 TEST=compiled locally and trybots Review URL: http://codereview.chromium.org/6347033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73249 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/sdch_manager.cc')
-rw-r--r--net/base/sdch_manager.cc37
1 files changed, 21 insertions, 16 deletions
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc
index 18976c9..354f87d 100644
--- a/net/base/sdch_manager.cc
+++ b/net/base/sdch_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -13,8 +13,7 @@
#include "net/base/registry_controlled_domain.h"
#include "net/url_request/url_request_http_job.h"
-using base::Time;
-using base::TimeDelta;
+namespace net {
//------------------------------------------------------------------------------
// static
@@ -28,16 +27,20 @@ SdchManager* SdchManager::global_;
//------------------------------------------------------------------------------
SdchManager::Dictionary::Dictionary(const std::string& dictionary_text,
- size_t offset, const std::string& client_hash, const GURL& gurl,
- const std::string& domain, const std::string& path, const Time& expiration,
- const std::set<int> ports)
- : text_(dictionary_text, offset),
- client_hash_(client_hash),
- url_(gurl),
- domain_(domain),
- path_(path),
- expiration_(expiration),
- ports_(ports) {
+ size_t offset,
+ const std::string& client_hash,
+ const GURL& gurl,
+ const std::string& domain,
+ const std::string& path,
+ const base::Time& expiration,
+ const std::set<int>& ports)
+ : text_(dictionary_text, offset),
+ client_hash_(client_hash),
+ url_(gurl),
+ domain_(domain),
+ path_(path),
+ expiration_(expiration),
+ ports_(ports) {
}
SdchManager::Dictionary::~Dictionary() {
@@ -66,7 +69,7 @@ bool SdchManager::Dictionary::CanAdvertise(const GURL& target_url) {
return false;
if (target_url.SchemeIsSecure())
return false;
- if (Time::Now() > expiration_)
+ if (base::Time::Now() > expiration_)
return false;
return true;
}
@@ -370,7 +373,7 @@ bool SdchManager::AddSdchDictionary(const std::string& dictionary_text,
std::string domain, path;
std::set<int> ports;
- Time expiration(Time::Now() + TimeDelta::FromDays(30));
+ base::Time expiration(base::Time::Now() + base::TimeDelta::FromDays(30));
if (dictionary_text.empty()) {
SdchErrorRecovery(DICTIONARY_HAS_NO_TEXT);
@@ -415,7 +418,7 @@ bool SdchManager::AddSdchDictionary(const std::string& dictionary_text,
} else if (name == "max-age") {
int64 seconds;
base::StringToInt64(value, &seconds);
- expiration = Time::Now() + TimeDelta::FromSeconds(seconds);
+ expiration = base::Time::Now() + base::TimeDelta::FromSeconds(seconds);
} else if (name == "port") {
int port;
base::StringToInt(value, &port);
@@ -543,3 +546,5 @@ void SdchManager::UrlSafeBase64Encode(const std::string& input,
}
}
}
+
+} // namespace net