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

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

Issue 10834134: Disable the Website Settings UI on Windows by default. It can be enabled by using the flag --enable… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on tot. Created 8 years, 4 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 | chrome/common/chrome_switches.h » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_editor.h" 10 #include "chrome/browser/bookmarks/bookmark_editor.h"
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 633
634 void ShowPageInfo(Browser* browser, 634 void ShowPageInfo(Browser* browser,
635 content::WebContents* web_contents, 635 content::WebContents* web_contents,
636 const GURL& url, 636 const GURL& url,
637 const SSLStatus& ssl, 637 const SSLStatus& ssl,
638 bool show_history) { 638 bool show_history) {
639 Profile* profile = Profile::FromBrowserContext( 639 Profile* profile = Profile::FromBrowserContext(
640 web_contents->GetBrowserContext()); 640 web_contents->GetBrowserContext());
641 TabContents* tab_contents = TabContents::FromWebContents(web_contents); 641 TabContents* tab_contents = TabContents::FromWebContents(web_contents);
642 642
643 #if defined(OS_WIN)
644 bool website_settings_enabled = true;
645 if (CommandLine::ForCurrentProcess()->HasSwitch( 643 if (CommandLine::ForCurrentProcess()->HasSwitch(
646 switches::kDisableWebsiteSettings)) 644 switches::kEnableWebsiteSettings)) {
647 website_settings_enabled = false;
648 #else
649 bool website_settings_enabled = false;
650 if (CommandLine::ForCurrentProcess()->HasSwitch(
651 switches::kEnableWebsiteSettings))
652 website_settings_enabled = true;
653 #endif
654 if (website_settings_enabled) {
655 browser->window()->ShowWebsiteSettings( 645 browser->window()->ShowWebsiteSettings(
656 profile, tab_contents, url, ssl, show_history); 646 profile, tab_contents, url, ssl, show_history);
657 } else { 647 } else {
658 browser->window()->ShowPageInfo(web_contents, url, ssl, show_history); 648 browser->window()->ShowPageInfo(web_contents, url, ssl, show_history);
659 } 649 }
660 } 650 }
661 651
662 void ShowChromeToMobileBubble(Browser* browser) { 652 void ShowChromeToMobileBubble(Browser* browser) {
663 // Only show the bubble if the window is active, otherwise we may get into 653 // Only show the bubble if the window is active, otherwise we may get into
664 // weird situations where the bubble is deleted as soon as it is shown. 654 // weird situations where the bubble is deleted as soon as it is shown.
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 if (!tab_contents) 979 if (!tab_contents)
990 tab_contents = new TabContents(contents); 980 tab_contents = new TabContents(contents);
991 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); 981 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true);
992 982
993 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 983 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
994 contents->GetRenderViewHost()->SyncRendererPrefs(); 984 contents->GetRenderViewHost()->SyncRendererPrefs();
995 app_browser->window()->Show(); 985 app_browser->window()->Show();
996 } 986 }
997 987
998 } // namespace chrome 988 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698