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

Unified Diff: chrome/browser/views/cookie_prompt_view.cc

Issue 2964003: Make kCookiePromptExpanded a profile pref rather than a local state pref so it can be synced. (Closed)
Patch Set: Windows changes. Created 10 years, 5 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/views/cookie_prompt_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/cookie_prompt_view.cc
diff --git a/chrome/browser/views/cookie_prompt_view.cc b/chrome/browser/views/cookie_prompt_view.cc
index 39240eebc070a39840d951861099264a9213931c..33f85af95735eeffcc2f1f1cb4190e38024a0166 100644
--- a/chrome/browser/views/cookie_prompt_view.cc
+++ b/chrome/browser/views/cookie_prompt_view.cc
@@ -53,9 +53,10 @@ CookiePromptView::CookiePromptView(
expanded_view_(false),
signaled_(false),
parent_(parent),
- root_window_(root_window) {
+ root_window_(root_window),
+ profile_(profile) {
InitializeViewResources();
- expanded_view_ = g_browser_process->local_state()->
+ expanded_view_ = profile_->GetPrefs()->
GetBoolean(prefs::kCookiePromptExpanded);
}
@@ -274,8 +275,8 @@ void CookiePromptView::ToggleDetailsViewExpand() {
int old_extended_height = GetExtendedViewHeight();
expanded_view_ = !expanded_view_;
- g_browser_process->local_state()->SetBoolean(prefs::kCookiePromptExpanded,
- expanded_view_);
+ profile_->GetPrefs()->SetBoolean(prefs::kCookiePromptExpanded,
+ expanded_view_);
// We have to set the visbility before asking for the extended view height
// again as there is a bug in combobox that results in preferred height
« no previous file with comments | « chrome/browser/views/cookie_prompt_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698