summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
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/browser/views/options
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/browser/views/options')
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc14
-rw-r--r--chrome/browser/views/options/cookies_view.cc31
2 files changed, 24 insertions, 21 deletions
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index 52ed1df..29382c4 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -636,16 +636,16 @@ class CookieBehaviorComboModel : public ChromeViews::ComboBox::Model {
return L"";
}
- static int CookiePolicyToIndex(CookiePolicy::Type policy) {
+ static int CookiePolicyToIndex(net::CookiePolicy::Type policy) {
return policy;
}
- static CookiePolicy::Type IndexToCookiePolicy(int index) {
- if (CookiePolicy::ValidType(index))
- return CookiePolicy::FromInt(index);
+ static net::CookiePolicy::Type IndexToCookiePolicy(int index) {
+ if (net::CookiePolicy::ValidType(index))
+ return net::CookiePolicy::FromInt(index);
NOTREACHED();
- return CookiePolicy::ALLOW_ALL_COOKIES;
+ return net::CookiePolicy::ALLOW_ALL_COOKIES;
}
private:
@@ -775,7 +775,7 @@ void SecuritySection::ItemChanged(ChromeViews::ComboBox* sender,
UserMetricsRecordAction(kUserMetrics[filter_policy], profile()->GetPrefs());
filter_mixed_content_.SetValue(filter_policy);
} else if (sender == cookie_behavior_combobox_) {
- CookiePolicy::Type cookie_policy =
+ net::CookiePolicy::Type cookie_policy =
CookieBehaviorComboModel::IndexToCookiePolicy(new_index);
const wchar_t* kUserMetrics[] = {
L"Options_AllowAllCookies",
@@ -884,7 +884,7 @@ void SecuritySection::NotifyPrefChanged(const std::wstring* pref_name) {
if (!pref_name || *pref_name == prefs::kCookieBehavior) {
cookie_behavior_combobox_->SetSelectedItem(
CookieBehaviorComboModel::CookiePolicyToIndex(
- CookiePolicy::FromInt(cookie_behavior_.GetValue())));
+ net::CookiePolicy::FromInt(cookie_behavior_.GetValue())));
}
if (!pref_name || *pref_name == prefs::kSafeBrowsingEnabled)
enable_safe_browsing_checkbox_->SetIsSelected(safe_browsing_.GetValue());
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index bd5424d..8d93fed 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -66,7 +66,7 @@ class CookiesTableModel : public ChromeViews::TableModel {
// Returns information about the Cookie at the specified index.
std::string GetDomainAt(int index);
- CookieMonster::CanonicalCookie& GetCookieAt(int index);
+ net::CookieMonster::CanonicalCookie& GetCookieAt(int index);
// Remove the specified cookies from the Cookie Monster and update the view.
void RemoveCookies(int start_index, int remove_count);
@@ -90,8 +90,8 @@ class CookiesTableModel : public ChromeViews::TableModel {
// The profile from which this model sources cookies.
Profile* profile_;
- typedef CookieMonster::CookieList CookieList;
- typedef std::vector<CookieMonster::CookieListPair*> CookiePtrList;
+ typedef net::CookieMonster::CookieList CookieList;
+ typedef std::vector<net::CookieMonster::CookieListPair*> CookiePtrList;
CookieList all_cookies_;
CookiePtrList shown_cookies_;
@@ -121,7 +121,8 @@ std::string CookiesTableModel::GetDomainAt(int index) {
return shown_cookies_.at(index)->first;
}
-CookieMonster::CanonicalCookie& CookiesTableModel::GetCookieAt(int index) {
+net::CookieMonster::CanonicalCookie& CookiesTableModel::GetCookieAt(
+ int index) {
DCHECK(index >= 0 && index < RowCount());
return shown_cookies_.at(index)->second;
}
@@ -132,7 +133,7 @@ void CookiesTableModel::RemoveCookies(int start_index, int remove_count) {
return;
}
- CookieMonster* monster = profile_->GetRequestContext()->cookie_store();
+ net::CookieMonster* monster = profile_->GetRequestContext()->cookie_store();
// We need to update the searched results list, the full cookie list,
// and the view. We walk through the search results list (which is what
@@ -207,17 +208,18 @@ void CookiesTableModel::SetObserver(ChromeViews::TableModelObserver* observer) {
// Returns true if |cookie| matches the specified filter, where "match" is
// defined as the cookie's domain, name and value contains filter text
// somewhere.
-static bool ContainsFilterText(const std::string& domain,
- const CookieMonster::CanonicalCookie& cookie,
- const std::string& filter) {
+static bool ContainsFilterText(
+ const std::string& domain,
+ const net::CookieMonster::CanonicalCookie& cookie,
+ const std::string& filter) {
return domain.find(filter) != std::string::npos ||
cookie.Name().find(filter) != std::string::npos ||
cookie.Value().find(filter) != std::string::npos;
}
// Sort ignore the '.' prefix for domain cookies.
-static bool CookieSorter(const CookieMonster::CookieListPair& cp1,
- const CookieMonster::CookieListPair& cp2) {
+static bool CookieSorter(const net::CookieMonster::CookieListPair& cp1,
+ const net::CookieMonster::CookieListPair& cp2) {
bool is1domain = !cp1.first.empty() && cp1.first[0] == '.';
bool is2domain = !cp2.first.empty() && cp2.first[0] == '.';
@@ -235,7 +237,7 @@ static bool CookieSorter(const CookieMonster::CookieListPair& cp1,
void CookiesTableModel::LoadCookies() {
// mmargh mmargh mmargh!
- CookieMonster* cookie_monster =
+ net::CookieMonster* cookie_monster =
profile_->GetRequestContext()->cookie_store();
all_cookies_ = cookie_monster->GetAllCookies();
std::sort(all_cookies_.begin(), all_cookies_.end(), CookieSorter);
@@ -335,7 +337,7 @@ class CookieInfoView : public ChromeViews::View {
// Update the display from the specified CookieNode.
void SetCookie(const std::string& domain,
- const CookieMonster::CanonicalCookie& cookie_node);
+ const net::CookieMonster::CanonicalCookie& cookie_node);
// Clears the cookie display to indicate that no or multiple cookies are
// selected.
@@ -393,8 +395,9 @@ CookieInfoView::CookieInfoView()
CookieInfoView::~CookieInfoView() {
}
-void CookieInfoView::SetCookie(const std::string& domain,
- const CookieMonster::CanonicalCookie& cookie) {
+void CookieInfoView::SetCookie(
+ const std::string& domain,
+ const net::CookieMonster::CanonicalCookie& cookie) {
name_value_field_->SetText(UTF8ToWide(cookie.Name()));
content_value_field_->SetText(UTF8ToWide(cookie.Value()));
domain_value_field_->SetText(UTF8ToWide(domain));