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

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

Issue 314016: Build sync by default on all platforms. Add a command line parameter to enab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/dom_ui/new_tab_ui.cc » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/keyboard_codes.h" 10 #include "base/keyboard_codes.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 command_updater_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, show_main_ui); 646 command_updater_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, show_main_ui);
647 command_updater_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, show_main_ui); 647 command_updater_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, show_main_ui);
648 command_updater_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, show_main_ui); 648 command_updater_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, show_main_ui);
649 649
650 // Show various bits of UI 650 // Show various bits of UI
651 command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui); 651 command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui);
652 command_updater_.UpdateCommandEnabled(IDC_NEW_PROFILE, show_main_ui); 652 command_updater_.UpdateCommandEnabled(IDC_NEW_PROFILE, show_main_ui);
653 command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui); 653 command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui);
654 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui); 654 command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui);
655 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui); 655 command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui);
656 command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS, show_main_ui); 656 #if defined(BROWSER_SYNC)
657 command_updater_.UpdateCommandEnabled(
658 IDC_SYNC_BOOKMARKS,
659 show_main_ui && profile_->GetProfileSyncService() != NULL);
660 #endif
657 command_updater_.UpdateCommandEnabled(IDC_OPTIONS, show_main_ui); 661 command_updater_.UpdateCommandEnabled(IDC_OPTIONS, show_main_ui);
658 command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui); 662 command_updater_.UpdateCommandEnabled(IDC_EDIT_SEARCH_ENGINES, show_main_ui);
659 command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui); 663 command_updater_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, show_main_ui);
660 command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui); 664 command_updater_.UpdateCommandEnabled(IDC_ABOUT, show_main_ui);
661 command_updater_.UpdateCommandEnabled(IDC_SHOW_APP_MENU, show_main_ui); 665 command_updater_.UpdateCommandEnabled(IDC_SHOW_APP_MENU, show_main_ui);
662 command_updater_.UpdateCommandEnabled(IDC_SHOW_PAGE_MENU, show_main_ui); 666 command_updater_.UpdateCommandEnabled(IDC_SHOW_PAGE_MENU, show_main_ui);
663 } 667 }
664 668
665 /////////////////////////////////////////////////////////////////////////////// 669 ///////////////////////////////////////////////////////////////////////////////
666 // Browser, Assorted browser commands: 670 // Browser, Assorted browser commands:
(...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after
2928 /////////////////////////////////////////////////////////////////////////////// 2932 ///////////////////////////////////////////////////////////////////////////////
2929 // BrowserToolbarModel (private): 2933 // BrowserToolbarModel (private):
2930 2934
2931 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2935 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2932 // This |current_tab| can be NULL during the initialization of the 2936 // This |current_tab| can be NULL during the initialization of the
2933 // toolbar during window creation (i.e. before any tabs have been added 2937 // toolbar during window creation (i.e. before any tabs have been added
2934 // to the window). 2938 // to the window).
2935 TabContents* current_tab = browser_->GetSelectedTabContents(); 2939 TabContents* current_tab = browser_->GetSelectedTabContents();
2936 return current_tab ? &current_tab->controller() : NULL; 2940 return current_tab ? &current_tab->controller() : NULL;
2937 } 2941 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698