Chromium Code Reviews| 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(); |