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

Unified Diff: chrome/browser/custom_home_pages_table_model.cc

Issue 1427563002: Disclude Settings window and settings-frame from startup pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/custom_home_pages_table_model.cc
diff --git a/chrome/browser/custom_home_pages_table_model.cc b/chrome/browser/custom_home_pages_table_model.cc
index 8b25d0a86f6f8dd84f1022963eb555fde30b29a0..5dc374831e52c2be71af0ef5aa8dd39ae120236c 100644
--- a/chrome/browser/custom_home_pages_table_model.cc
+++ b/chrome/browser/custom_home_pages_table_model.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/settings_window_manager.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -38,8 +39,10 @@ bool ShouldAddPage(const GURL& url) {
return false;
if (url.SchemeIs(content::kChromeUIScheme)) {
- if (url.host() == chrome::kChromeUISettingsHost)
+ if (url.host() == chrome::kChromeUISettingsHost ||
+ url.host() == chrome::kChromeUISettingsFrameHost) {
return false;
+ }
// For a settings page, the path will start with "/settings" not "settings"
// so find() will return 1, not 0.
@@ -187,6 +190,10 @@ void CustomHomePagesTableModel::SetToCurrentlyOpenPages() {
Browser* browser = *it;
if (browser->profile() != profile_)
sky 2015/10/27 13:07:46 Can you move this and your new if into a ShouldAdd
stevenjb 2015/10/27 16:30:49 Done.
continue; // Skip incognito browsers.
+ if (chrome::SettingsWindowManager::GetInstance()->IsSettingsBrowser(
+ browser)) {
+ continue; // Skip the Settings window.
+ }
for (int tab_index = 0;
tab_index < browser->tab_strip_model()->count();
« 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