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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/auto_login_prompter.cc ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 4689 matching lines...) Expand 10 before | Expand all | Expand 10 after
4700 void Browser::UpdateCommandsForBookmarkBar() { 4700 void Browser::UpdateCommandsForBookmarkBar() {
4701 const bool show_main_ui = IsShowingMainUI(window_ && window_->IsFullscreen()); 4701 const bool show_main_ui = IsShowingMainUI(window_ && window_->IsFullscreen());
4702 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, 4702 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR,
4703 browser_defaults::bookmarks_enabled && 4703 browser_defaults::bookmarks_enabled &&
4704 !profile_->GetPrefs()->IsManagedPreference(prefs::kShowBookmarkBar) && 4704 !profile_->GetPrefs()->IsManagedPreference(prefs::kShowBookmarkBar) &&
4705 show_main_ui); 4705 show_main_ui);
4706 } 4706 }
4707 4707
4708 void Browser::MarkHomePageAsChanged(PrefService* pref_service) { 4708 void Browser::MarkHomePageAsChanged(PrefService* pref_service) {
4709 pref_service->SetBoolean(prefs::kHomePageChanged, true); 4709 pref_service->SetBoolean(prefs::kHomePageChanged, true);
4710 pref_service->ScheduleSavePersistentPrefs();
4711 } 4710 }
4712 4711
4713 void Browser::UpdateSaveAsState(int content_restrictions) { 4712 void Browser::UpdateSaveAsState(int content_restrictions) {
4714 bool enabled = !(content_restrictions & content::CONTENT_RESTRICTION_SAVE); 4713 bool enabled = !(content_restrictions & content::CONTENT_RESTRICTION_SAVE);
4715 PrefService* state = g_browser_process->local_state(); 4714 PrefService* state = g_browser_process->local_state();
4716 if (state) 4715 if (state)
4717 enabled = enabled && state->GetBoolean(prefs::kAllowFileSelectionDialogs); 4716 enabled = enabled && state->GetBoolean(prefs::kAllowFileSelectionDialogs);
4718 4717
4719 command_updater_.UpdateCommandEnabled(IDC_SAVE_PAGE, enabled); 4718 command_updater_.UpdateCommandEnabled(IDC_SAVE_PAGE, enabled);
4720 } 4719 }
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
5377 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); 5376 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
5378 } else { 5377 } else {
5379 GlobalErrorService* service = 5378 GlobalErrorService* service =
5380 GlobalErrorServiceFactory::GetForProfile(profile()); 5379 GlobalErrorServiceFactory::GetForProfile(profile());
5381 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5380 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5382 if (error) { 5381 if (error) {
5383 error->ShowBubbleView(this); 5382 error->ShowBubbleView(this);
5384 } 5383 }
5385 } 5384 }
5386 } 5385 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/auto_login_prompter.cc ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698