Commit c2e7bc23 authored by tfarina's avatar tfarina Committed by Commit bot

bookmarks: Use OnImportBookmarks for naming instructions delegate method.

Do not use an action when naming an event that will be fired to the
delegate. Instead of saying what the delegate should do or will do, just
say what event happened. So in this case, say to the delegate that the
instructions import link on the Bookmarks Bar was clicked.

BUG=None
TEST=have zero bookmarks in your Bookmarks Bar, so you can see the link there,
click on it to show the import dialog. No regressions should be observed.
R=sky@chromium.org

Review URL: https://codereview.chromium.org/789653004

Cr-Commit-Position: refs/heads/master@{#308291}
parent 24fc2709
......@@ -9,7 +9,7 @@
// bookmarks.
class BookmarkBarInstructionsDelegate {
public:
virtual void ShowImportDialog() = 0;
virtual void OnImportBookmarks() = 0;
protected:
virtual ~BookmarkBarInstructionsDelegate() {}
......
......@@ -104,7 +104,7 @@ void BookmarkBarInstructionsView::GetAccessibleState(
void BookmarkBarInstructionsView::LinkClicked(views::Link* source,
int event_flags) {
delegate_->ShowImportDialog();
delegate_->OnImportBookmarks();
}
void BookmarkBarInstructionsView::ShowContextMenuForView(
......
......@@ -1131,7 +1131,7 @@ void BookmarkBarView::BookmarkMenuControllerDeleted(
bookmark_drop_menu_ = NULL;
}
void BookmarkBarView::ShowImportDialog() {
void BookmarkBarView::OnImportBookmarks() {
int64 install_time = g_browser_process->metrics_service()->GetInstallDate();
int64 time_from_install = base::Time::Now().ToTimeT() - install_time;
if (bookmark_bar_state_ == BookmarkBar::SHOW) {
......
......@@ -194,7 +194,7 @@ class BookmarkBarView : public DetachableToolbarView,
BookmarkMenuController* controller) override;
// BookmarkBarInstructionsDelegate:
void ShowImportDialog() override;
void OnImportBookmarks() override;
// BookmarkBubbleViewObserver:
void OnBookmarkBubbleShown(const GURL& url) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment