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

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

Issue 7224002: Fix a crash in Chrome when clicking on the "Settings..." menu item for a desktop notification sho... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 | « no previous file | no next file » | 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 <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 std::string report_page_url = 1983 std::string report_page_url =
1984 ReplaceStringPlaceholders(kBrokenPageUrl, subst, NULL); 1984 ReplaceStringPlaceholders(kBrokenPageUrl, subst, NULL);
1985 ShowSingletonTab(GURL(report_page_url)); 1985 ShowSingletonTab(GURL(report_page_url));
1986 } 1986 }
1987 1987
1988 void Browser::ShowOptionsTab(const std::string& sub_page) { 1988 void Browser::ShowOptionsTab(const std::string& sub_page) {
1989 browser::NavigateParams params(GetSingletonTabNavigateParams( 1989 browser::NavigateParams params(GetSingletonTabNavigateParams(
1990 GURL(chrome::kChromeUISettingsURL + sub_page))); 1990 GURL(chrome::kChromeUISettingsURL + sub_page)));
1991 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; 1991 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE;
1992 1992
1993 if ((GetSelectedTabContents()->GetURL() == GURL(chrome::kChromeUINewTabURL) || 1993 if (GetSelectedTabContents() != NULL &&
1994 (GetSelectedTabContents()->GetURL() == GURL(chrome::kChromeUINewTabURL) ||
1994 GetSelectedTabContents()->GetURL() == GURL(chrome::kAboutBlankURL)) && 1995 GetSelectedTabContents()->GetURL() == GURL(chrome::kAboutBlankURL)) &&
1995 browser::GetIndexOfSingletonTab(&params) < 0) { 1996 browser::GetIndexOfSingletonTab(&params) < 0) {
1996 params.disposition = CURRENT_TAB; 1997 params.disposition = CURRENT_TAB;
1997 } 1998 }
1998 1999
1999 browser::Navigate(&params); 2000 browser::Navigate(&params);
2000 } 2001 }
2001 2002
2002 void Browser::OpenClearBrowsingDataDialog() { 2003 void Browser::OpenClearBrowsingDataDialog() {
2003 UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg")); 2004 UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg"));
(...skipping 2692 matching lines...) Expand 10 before | Expand all | Expand 10 after
4696 TabContents* current_tab = GetSelectedTabContents(); 4697 TabContents* current_tab = GetSelectedTabContents();
4697 if (current_tab) { 4698 if (current_tab) {
4698 content_restrictions = current_tab->content_restrictions(); 4699 content_restrictions = current_tab->content_restrictions();
4699 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4700 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4700 // See comment in UpdateCommandsForTabState about why we call url(). 4701 // See comment in UpdateCommandsForTabState about why we call url().
4701 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4702 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4702 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4703 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4703 } 4704 }
4704 return content_restrictions; 4705 return content_restrictions;
4705 } 4706 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698