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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 9863032: [Sync] [Mac] Implement one-click signin bubble for OS X (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address sky's comments Created 8 years, 9 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
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sync/one_click_signin_helper.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index b5329ba88c0fe99c997fc54c8f1d55701262053d..37b7ae7328fbb2e21cd4e352a0c4d44878692fc9 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -24,11 +24,14 @@
#include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/url_constants.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "content/public/common/frame_navigate_params.h"
+#include "content/public/common/page_transition_types.h"
+#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
@@ -123,6 +126,19 @@ string16 OneClickLoginInfoBarDelegate::GetButtonLabel(
namespace {
+void OnLearnMore(Browser* browser) {
+ browser->AddSelectedTabWithURL(
+ GURL(chrome::kSyncLearnMoreURL),
+ content::PAGE_TRANSITION_AUTO_BOOKMARK);
+}
+
+void OnAdvanced(Browser* browser) {
+ browser->AddSelectedTabWithURL(
+ GURL(std::string(chrome::kChromeUISettingsURL) +
+ chrome::kSyncSetupSubPage),
+ content::PAGE_TRANSITION_AUTO_BOOKMARK);
+}
+
// Start syncing with the given user information.
void StartSync(content::WebContents* web_contents,
const std::string& session_index,
@@ -137,7 +153,9 @@ void StartSync(content::WebContents* web_contents,
profile, session_index, email, password, use_default_settings));
Browser* browser = BrowserList::FindBrowserWithWebContents(web_contents);
- browser->window()->ShowOneClickSigninBubble();
+ browser->window()->ShowOneClickSigninBubble(
+ base::Bind(&OnLearnMore, base::Unretained(browser)),
+ base::Bind(&OnAdvanced, base::Unretained(browser)));
}
} // namespace
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698