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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 18603006: Bookmark sync promo for Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BookmarkBubbleView independant from browser, layout_constants and CAPS for enum Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 06081f17624339e361de50da4b31a70dbfca9120..9555eafb383b426f34917296554ec4e7f6c0be16 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -59,6 +59,7 @@
#include "chrome/browser/ui/views/avatar_menu_bubble_view.h"
#include "chrome/browser/ui/views/avatar_menu_button.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
+#include "chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.h"
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h"
#include "chrome/browser/ui/views/download/download_shelf_view.h"
@@ -1115,9 +1116,19 @@ void BrowserView::ShowUpdateChromeDialog() {
}
void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) {
+ views::View* sync_promo = NULL;
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kEnableBookmarkSyncPromo) &&
+ SyncPromoUI::ShouldShowSyncPromo(browser()->profile())) {
+ sync_promo = new BookmarkSyncPromoView(browser_.get());
+ }
+
chrome::ShowBookmarkBubbleView(GetToolbarView()->GetBookmarkBubbleAnchor(),
- bookmark_bar_view_.get(), browser_->profile(),
- url, !already_bookmarked);
+ bookmark_bar_view_.get(),
+ browser_->profile(),
+ url,
+ !already_bookmarked,
+ sync_promo);
}
void BrowserView::ShowBookmarkPrompt() {

Powered by Google App Engine
This is Rietveld 408576698