| OLD | NEW |
| 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 4530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4541 const bool show_main_ui = is_type_tabbed(); | 4541 const bool show_main_ui = is_type_tabbed(); |
| 4542 #endif | 4542 #endif |
| 4543 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, | 4543 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, |
| 4544 browser_defaults::bookmarks_enabled && | 4544 browser_defaults::bookmarks_enabled && |
| 4545 !profile_->GetPrefs()->IsManagedPreference(prefs::kShowBookmarkBar) && | 4545 !profile_->GetPrefs()->IsManagedPreference(prefs::kShowBookmarkBar) && |
| 4546 show_main_ui); | 4546 show_main_ui); |
| 4547 } | 4547 } |
| 4548 | 4548 |
| 4549 void Browser::MarkHomePageAsChanged(PrefService* pref_service) { | 4549 void Browser::MarkHomePageAsChanged(PrefService* pref_service) { |
| 4550 pref_service->SetBoolean(prefs::kHomePageChanged, true); | 4550 pref_service->SetBoolean(prefs::kHomePageChanged, true); |
| 4551 pref_service->ScheduleSavePersistentPrefs(); | |
| 4552 } | 4551 } |
| 4553 | 4552 |
| 4554 void Browser::UpdateSaveAsState(int content_restrictions) { | 4553 void Browser::UpdateSaveAsState(int content_restrictions) { |
| 4555 bool enabled = !(content_restrictions & CONTENT_RESTRICTION_SAVE); | 4554 bool enabled = !(content_restrictions & CONTENT_RESTRICTION_SAVE); |
| 4556 PrefService* state = g_browser_process->local_state(); | 4555 PrefService* state = g_browser_process->local_state(); |
| 4557 if (state) | 4556 if (state) |
| 4558 enabled = enabled && state->GetBoolean(prefs::kAllowFileSelectionDialogs); | 4557 enabled = enabled && state->GetBoolean(prefs::kAllowFileSelectionDialogs); |
| 4559 | 4558 |
| 4560 command_updater_.UpdateCommandEnabled(IDC_SAVE_PAGE, enabled); | 4559 command_updater_.UpdateCommandEnabled(IDC_SAVE_PAGE, enabled); |
| 4561 } | 4560 } |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5274 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5273 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
| 5275 } else if (is_type_tabbed()) { | 5274 } else if (is_type_tabbed()) { |
| 5276 GlobalErrorService* service = | 5275 GlobalErrorService* service = |
| 5277 GlobalErrorServiceFactory::GetForProfile(profile()); | 5276 GlobalErrorServiceFactory::GetForProfile(profile()); |
| 5278 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5277 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
| 5279 if (error) { | 5278 if (error) { |
| 5280 error->ShowBubbleView(this); | 5279 error->ShowBubbleView(this); |
| 5281 } | 5280 } |
| 5282 } | 5281 } |
| 5283 } | 5282 } |
| OLD | NEW |