summaryrefslogtreecommitdiffstats
path: root/chrome/common/net
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 19:40:37 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-31 19:40:37 +0000
commit8ac1a75acadaa2aae065212cb6255d00c789a184 (patch)
tree854eaf66ba8ce7e581bd8e6f1fa75f46d22f4bb7 /chrome/common/net
parent287a019ed5d015185cab41f6c7156dc6c4cbcee7 (diff)
downloadchromium_src-8ac1a75acadaa2aae065212cb6255d00c789a184.zip
chromium_src-8ac1a75acadaa2aae065212cb6255d00c789a184.tar.gz
chromium_src-8ac1a75acadaa2aae065212cb6255d00c789a184.tar.bz2
Move more net classes into the net namespace. Also remove the net_util namespace in favor of the net namespace.
This is a purely mechanical change. There should be no logic changes. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/net')
-rw-r--r--chrome/common/net/cookie_monster_sqlite.cc32
-rw-r--r--chrome/common/net/cookie_monster_sqlite.h8
-rw-r--r--chrome/common/net/url_request_intercept_job.cc8
3 files changed, 24 insertions, 24 deletions
diff --git a/chrome/common/net/cookie_monster_sqlite.cc b/chrome/common/net/cookie_monster_sqlite.cc
index 259b8f2..51c417b 100644
--- a/chrome/common/net/cookie_monster_sqlite.cc
+++ b/chrome/common/net/cookie_monster_sqlite.cc
@@ -59,9 +59,9 @@ class SQLitePersistentCookieStore::Backend
// Batch a cookie add
void AddCookie(const std::string& key,
- const CookieMonster::CanonicalCookie& cc);
+ const net::CookieMonster::CanonicalCookie& cc);
// Batch a cookie delete
- void DeleteCookie(const CookieMonster::CanonicalCookie& cc);
+ void DeleteCookie(const net::CookieMonster::CanonicalCookie& cc);
// Commit and pending operations and close the database, must be called
// before the object is destructed.
void Close();
@@ -76,24 +76,24 @@ class SQLitePersistentCookieStore::Backend
PendingOperation(OperationType op,
const std::string& key,
- const CookieMonster::CanonicalCookie& cc)
+ const net::CookieMonster::CanonicalCookie& cc)
: op_(op), key_(key), cc_(cc) { }
OperationType op() const { return op_; }
const std::string& key() const { return key_; }
- const CookieMonster::CanonicalCookie& cc() const { return cc_; }
+ const net::CookieMonster::CanonicalCookie& cc() const { return cc_; }
private:
OperationType op_;
std::string key_; // Only used for OP_ADD
- CookieMonster::CanonicalCookie cc_;
+ net::CookieMonster::CanonicalCookie cc_;
};
private:
// Batch a cookie operation (add or delete)
void BatchOperation(PendingOperation::OperationType op,
const std::string& key,
- const CookieMonster::CanonicalCookie& cc);
+ const net::CookieMonster::CanonicalCookie& cc);
// Commit our pending operations to the database.
void Commit();
// Close() executed on the background thread.
@@ -113,19 +113,19 @@ class SQLitePersistentCookieStore::Backend
void SQLitePersistentCookieStore::Backend::AddCookie(
const std::string& key,
- const CookieMonster::CanonicalCookie& cc) {
+ const net::CookieMonster::CanonicalCookie& cc) {
BatchOperation(PendingOperation::COOKIE_ADD, key, cc);
}
void SQLitePersistentCookieStore::Backend::DeleteCookie(
- const CookieMonster::CanonicalCookie& cc) {
+ const net::CookieMonster::CanonicalCookie& cc) {
BatchOperation(PendingOperation::COOKIE_DELETE, std::string(), cc);
}
void SQLitePersistentCookieStore::Backend::BatchOperation(
PendingOperation::OperationType op,
const std::string& key,
- const CookieMonster::CanonicalCookie& cc) {
+ const net::CookieMonster::CanonicalCookie& cc) {
// Commit every 30 seconds.
static const int kCommitIntervalMs = 30 * 1000;
// Commit right away if we have more than 512 outstanding operations.
@@ -288,7 +288,7 @@ bool InitTable(sqlite3* db) {
} // namespace
bool SQLitePersistentCookieStore::Load(
- std::vector<CookieMonster::KeyedCanonicalCookie>* cookies) {
+ std::vector<net::CookieMonster::KeyedCanonicalCookie>* cookies) {
DCHECK(!path_.empty());
sqlite3* db;
if (sqlite3_open(WideToUTF8(path_).c_str(), &db) != SQLITE_OK) {
@@ -323,8 +323,8 @@ bool SQLitePersistentCookieStore::Load(
while (smt.step() == SQLITE_ROW) {
std::string key = smt.column_string(1);
- scoped_ptr<CookieMonster::CanonicalCookie> cc(
- new CookieMonster::CanonicalCookie(
+ scoped_ptr<net::CookieMonster::CanonicalCookie> cc(
+ new net::CookieMonster::CanonicalCookie(
smt.column_string(2), // name
smt.column_string(3), // value
smt.column_string(4), // path
@@ -340,8 +340,8 @@ bool SQLitePersistentCookieStore::Load(
DLOG_IF(WARNING,
cc->CreationDate() > Time::Now()) << L"CreationDate too recent";
cookies->push_back(
- CookieMonster::KeyedCanonicalCookie(smt.column_string(1),
- cc.release()));
+ net::CookieMonster::KeyedCanonicalCookie(smt.column_string(1),
+ cc.release()));
}
// Create the backend, this will take ownership of the db pointer.
@@ -366,13 +366,13 @@ bool SQLitePersistentCookieStore::EnsureDatabaseVersion(sqlite3* db) {
void SQLitePersistentCookieStore::AddCookie(
const std::string& key,
- const CookieMonster::CanonicalCookie& cc) {
+ const net::CookieMonster::CanonicalCookie& cc) {
if (backend_.get())
backend_->AddCookie(key, cc);
}
void SQLitePersistentCookieStore::DeleteCookie(
- const CookieMonster::CanonicalCookie& cc) {
+ const net::CookieMonster::CanonicalCookie& cc) {
if (backend_.get())
backend_->DeleteCookie(cc);
}
diff --git a/chrome/common/net/cookie_monster_sqlite.h b/chrome/common/net/cookie_monster_sqlite.h
index 49de96a..44d1e1dd 100644
--- a/chrome/common/net/cookie_monster_sqlite.h
+++ b/chrome/common/net/cookie_monster_sqlite.h
@@ -43,17 +43,17 @@
struct sqlite3;
class SQLitePersistentCookieStore
- : public CookieMonster::PersistentCookieStore {
+ : public net::CookieMonster::PersistentCookieStore {
public:
SQLitePersistentCookieStore(const std::wstring& path,
MessageLoop* background_loop);
~SQLitePersistentCookieStore();
- virtual bool Load(std::vector<CookieMonster::KeyedCanonicalCookie>*);
+ virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*);
virtual void AddCookie(const std::string&,
- const CookieMonster::CanonicalCookie&);
- virtual void DeleteCookie(const CookieMonster::CanonicalCookie&);
+ const net::CookieMonster::CanonicalCookie&);
+ virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&);
private:
class Backend;
diff --git a/chrome/common/net/url_request_intercept_job.cc b/chrome/common/net/url_request_intercept_job.cc
index 4da58d0c..3f245de 100644
--- a/chrome/common/net/url_request_intercept_job.cc
+++ b/chrome/common/net/url_request_intercept_job.cc
@@ -160,10 +160,10 @@ void URLRequestInterceptJob::GetResponseInfo(net::HttpResponseInfo* info) {
<< request_->url();
info->ssl_info.cert =
- new X509Certificate(request_->url().GetWithEmptyPath().spec(),
- kCertIssuer,
- Time::Now(),
- Time::Now() + TimeDelta::FromDays(kLifetimeDays));
+ new net::X509Certificate(request_->url().GetWithEmptyPath().spec(),
+ kCertIssuer,
+ Time::Now(),
+ Time::Now() + TimeDelta::FromDays(kLifetimeDays));
info->ssl_info.cert_status = 0;
info->ssl_info.security_bits = 0;
}