OLD | NEW |
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/views/bookmarks/bookmark_bar_view.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1115 } | 1115 } |
1116 | 1116 |
1117 void BookmarkBarView::BookmarkMenuControllerDeleted( | 1117 void BookmarkBarView::BookmarkMenuControllerDeleted( |
1118 BookmarkMenuController* controller) { | 1118 BookmarkMenuController* controller) { |
1119 if (controller == bookmark_menu_) | 1119 if (controller == bookmark_menu_) |
1120 bookmark_menu_ = NULL; | 1120 bookmark_menu_ = NULL; |
1121 else if (controller == bookmark_drop_menu_) | 1121 else if (controller == bookmark_drop_menu_) |
1122 bookmark_drop_menu_ = NULL; | 1122 bookmark_drop_menu_ = NULL; |
1123 } | 1123 } |
1124 | 1124 |
1125 void BookmarkBarView::ShowImportDialog() { | 1125 void BookmarkBarView::OnImportBookmarks() { |
1126 int64 install_time = g_browser_process->metrics_service()->GetInstallDate(); | 1126 int64 install_time = g_browser_process->metrics_service()->GetInstallDate(); |
1127 int64 time_from_install = base::Time::Now().ToTimeT() - install_time; | 1127 int64 time_from_install = base::Time::Now().ToTimeT() - install_time; |
1128 if (bookmark_bar_state_ == BookmarkBar::SHOW) { | 1128 if (bookmark_bar_state_ == BookmarkBar::SHOW) { |
1129 UMA_HISTOGRAM_COUNTS("Import.ShowDialog.FromBookmarkBarView", | 1129 UMA_HISTOGRAM_COUNTS("Import.ShowDialog.FromBookmarkBarView", |
1130 time_from_install); | 1130 time_from_install); |
1131 } else if (bookmark_bar_state_ == BookmarkBar::DETACHED) { | 1131 } else if (bookmark_bar_state_ == BookmarkBar::DETACHED) { |
1132 UMA_HISTOGRAM_COUNTS("Import.ShowDialog.FromFloatingBookmarkBarView", | 1132 UMA_HISTOGRAM_COUNTS("Import.ShowDialog.FromFloatingBookmarkBarView", |
1133 time_from_install); | 1133 time_from_install); |
1134 } | 1134 } |
1135 | 1135 |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 return; | 1951 return; |
1952 apps_page_shortcut_->SetVisible(visible); | 1952 apps_page_shortcut_->SetVisible(visible); |
1953 UpdateBookmarksSeparatorVisibility(); | 1953 UpdateBookmarksSeparatorVisibility(); |
1954 LayoutAndPaint(); | 1954 LayoutAndPaint(); |
1955 } | 1955 } |
1956 | 1956 |
1957 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { | 1957 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { |
1958 if (UpdateOtherAndManagedButtonsVisibility()) | 1958 if (UpdateOtherAndManagedButtonsVisibility()) |
1959 LayoutAndPaint(); | 1959 LayoutAndPaint(); |
1960 } | 1960 } |
OLD | NEW |