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

Unified Diff: chrome/browser/views/options/content_settings_window_view.cc

Issue 650180: Initial Geolocation location bar icons. (Closed)
Patch Set: Addresses Peter and Brett's comments. Created 10 years, 9 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
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*
« no previous file with comments | « chrome/browser/views/content_blocked_bubble_contents.cc ('k') | chrome/browser/views/options/exceptions_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698