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

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

Issue 338008: Resubmit http://codereview.chromium.org/314016 with views fixed (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « chrome/browser/sync/sync_status_ui_helper.cc ('k') | chrome/browser/views/toolbar_view.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/views/bookmark_bar_view.h" 5 #include "chrome/browser/views/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 } 1701 }
1702 return prefsize; 1702 return prefsize;
1703 } 1703 }
1704 1704
1705 #if defined(BROWSER_SYNC) 1705 #if defined(BROWSER_SYNC)
1706 // The sync state reported by the profile sync service determines whether or 1706 // The sync state reported by the profile sync service determines whether or
1707 // not the re-login indicator button should be visible. 1707 // not the re-login indicator button should be visible.
1708 bool BookmarkBarView::ShouldShowSyncErrorButton() { 1708 bool BookmarkBarView::ShouldShowSyncErrorButton() {
1709 bool show_sync_error_button(false); 1709 bool show_sync_error_button(false);
1710 if (sync_service_ && sync_service_->HasSyncSetupCompleted()) { 1710 if (sync_service_ && sync_service_->HasSyncSetupCompleted()) {
1711 std::wstring status_text; 1711 string16 status_text;
1712 std::wstring link_text; 1712 string16 link_text;
1713 SyncStatusUIHelper::MessageType sync_status; 1713 SyncStatusUIHelper::MessageType sync_status;
1714 sync_status = SyncStatusUIHelper::GetLabels( 1714 sync_status = SyncStatusUIHelper::GetLabels(
1715 sync_service_, &status_text, &link_text); 1715 sync_service_, &status_text, &link_text);
1716 if (sync_status == SyncStatusUIHelper::SYNC_ERROR) { 1716 if (sync_status == SyncStatusUIHelper::SYNC_ERROR) {
1717 show_sync_error_button = true; 1717 show_sync_error_button = true;
1718 } 1718 }
1719 } 1719 }
1720 return show_sync_error_button; 1720 return show_sync_error_button;
1721 } 1721 }
1722 1722
1723 views::TextButton* BookmarkBarView::CreateSyncErrorButton() { 1723 views::TextButton* BookmarkBarView::CreateSyncErrorButton() {
1724 views::TextButton* sync_error_button = 1724 views::TextButton* sync_error_button =
1725 new views::TextButton(this, 1725 new views::TextButton(this,
1726 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR)); 1726 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR));
1727 sync_error_button->set_tag(kSyncErrorButtonTag); 1727 sync_error_button->set_tag(kSyncErrorButtonTag);
1728 1728
1729 // The tooltip is the only way we have to display text explaining the error 1729 // The tooltip is the only way we have to display text explaining the error
1730 // to the user. 1730 // to the user.
1731 sync_error_button->SetTooltipText( 1731 sync_error_button->SetTooltipText(
1732 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)); 1732 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC));
1733 sync_error_button->SetAccessibleName( 1733 sync_error_button->SetAccessibleName(
1734 l10n_util::GetString(IDS_ACCNAME_SYNC_ERROR_BUTTON)); 1734 l10n_util::GetString(IDS_ACCNAME_SYNC_ERROR_BUTTON));
1735 sync_error_button->SetIcon( 1735 sync_error_button->SetIcon(
1736 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); 1736 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
1737 return sync_error_button; 1737 return sync_error_button;
1738 } 1738 }
1739 #endif // defined(BROWSER_SYNC) 1739 #endif // defined(BROWSER_SYNC)
1740
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_status_ui_helper.cc ('k') | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698