Index: chrome/browser/views/options/content_settings_window_view.cc |
diff --git a/chrome/browser/views/options/content_settings_window_view.cc b/chrome/browser/views/options/content_settings_window_view.cc |
index 2a09034b82f0dd87b0007a414c32cbd94d4697e6..57f1a2f7e5928d6b90a52a7cff3d03da1b691db3 100644 |
--- a/chrome/browser/views/options/content_settings_window_view.cc |
+++ b/chrome/browser/views/options/content_settings_window_view.cc |
@@ -6,6 +6,7 @@ |
#include "app/l10n_util.h" |
#include "app/resource_bundle.h" |
+#include "base/command_line.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/pref_service.h" |
#include "chrome/browser/profile.h" |
@@ -13,7 +14,9 @@ |
#include "chrome/browser/views/options/content_filter_page_view.h" |
#include "chrome/browser/views/options/cookie_filter_page_view.h" |
#include "chrome/browser/views/options/general_page_view.h" |
+#include "chrome/browser/views/options/geolocation_filter_page_view.h" |
#include "chrome/common/chrome_constants.h" |
+#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "grit/chromium_strings.h" |
#include "grit/generated_resources.h" |
@@ -168,8 +171,17 @@ void ContentSettingsWindowView::Init() { |
tabs_->AddTabAtIndex(tab_index++, |
l10n_util::GetString(IDS_POPUP_TAB_LABEL), |
popup_page, false); |
- |
- DCHECK_EQ(tabs_->GetTabCount(), CONTENT_SETTINGS_NUM_TYPES); |
+ int num_tabs = CONTENT_SETTINGS_NUM_TYPES - 1; |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableGeolocation)) { |
+ GeolocationFilterPageView* geolocation_page = |
+ new GeolocationFilterPageView(profile_); |
+ tabs_->AddTabAtIndex(tab_index++, |
+ l10n_util::GetString(IDS_GEOLOCATION_TAB_LABEL), |
+ geolocation_page, false); |
+ ++num_tabs; |
+ } |
+ DCHECK_EQ(tabs_->GetTabCount(), num_tabs); |
} |
const OptionsPageView* |