Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1462)

Unified Diff: chrome/browser/gtk/options/advanced_contents_gtk.cc

Issue 556095: Changes to support new cookie policy.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.mm ('k') | chrome/browser/host_content_settings_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/options/advanced_contents_gtk.cc
===================================================================
--- chrome/browser/gtk/options/advanced_contents_gtk.cc (revision 37613)
+++ chrome/browser/gtk/options/advanced_contents_gtk.cc (working copy)
@@ -36,7 +36,6 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
-#include "net/base/cookie_policy.h"
namespace {
@@ -532,7 +531,6 @@
BooleanPrefMember dns_prefetch_enabled_;
BooleanPrefMember safe_browsing_;
BooleanPrefMember enable_metrics_recording_;
- IntegerPrefMember cookie_behavior_;
// Flag to ignore gtk callbacks while we are loading prefs, to avoid
// then turning around and saving them again.
@@ -666,7 +664,6 @@
safe_browsing_.Init(prefs::kSafeBrowsingEnabled, profile->GetPrefs(), this);
enable_metrics_recording_.Init(prefs::kMetricsReportingEnabled,
g_browser_process->local_state(), this);
- cookie_behavior_.Init(prefs::kCookieBehavior, profile->GetPrefs(), this);
NotifyPrefChanged(NULL);
}
@@ -768,23 +765,7 @@
// static
void PrivacySection::OnCookieBehaviorChanged(GtkComboBox* combo_box,
PrivacySection* privacy_section) {
- if (privacy_section->pref_changing_)
- return;
- net::CookiePolicy::Type cookie_policy =
- net::CookiePolicy::FromInt(gtk_combo_box_get_active(combo_box));
- const char* kUserMetrics[] = {
- "Options_AllowAllCookies",
- "Options_BlockThirdPartyCookies",
- "Options_BlockAllCookies"
- };
- if (cookie_policy < 0 ||
- static_cast<size_t>(cookie_policy) >= arraysize(kUserMetrics)) {
- NOTREACHED();
- return;
- }
- privacy_section->UserMetricsRecordAction(
- kUserMetrics[cookie_policy], privacy_section->profile()->GetPrefs());
- privacy_section->cookie_behavior_.SetValue(cookie_policy);
+ // TODO(darin): Remove everything else related to this setter.
}
// static
@@ -825,11 +806,6 @@
ResolveMetricsReportingEnabled();
}
#endif
- if (!pref_name || *pref_name == prefs::kCookieBehavior) {
- gtk_combo_box_set_active(
- GTK_COMBO_BOX(cookie_behavior_combobox_),
- net::CookiePolicy::FromInt(cookie_behavior_.GetValue()));
- }
pref_changing_ = false;
}
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.mm ('k') | chrome/browser/host_content_settings_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698