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

Unified Diff: chrome/browser/extensions/app_notify_channel_setup.cc

Issue 9456031: Remove PSS::ShowLoginDialog() and obsolete IDC_SYNC_BOOKMARKS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review feedback. Created 8 years, 10 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/app_controller_mac.mm ('k') | chrome/browser/extensions/app_notify_channel_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/app_notify_channel_setup.cc
diff --git a/chrome/browser/extensions/app_notify_channel_setup.cc b/chrome/browser/extensions/app_notify_channel_setup.cc
index 8268345b4371edbb30e9732f792ff4adf6f9060b..b735b7b736313dd799618ef4b9904e8f8770953d 100644
--- a/chrome/browser/extensions/app_notify_channel_setup.cc
+++ b/chrome/browser/extensions/app_notify_channel_setup.cc
@@ -15,6 +15,8 @@
#include "base/stringprintf.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/signin/signin_manager.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/token_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/gaia/gaia_constants.h"
@@ -147,8 +149,8 @@ URLFetcher* AppNotifyChannelSetup::CreateURLFetcher(
}
bool AppNotifyChannelSetup::ShouldPromptForLogin() const {
- std::string username = profile_->GetPrefs()->GetString(
- prefs::kGoogleServicesUsername);
+ std::string username =
+ SigninManagerFactory::GetForProfile(profile_)->GetAuthenticatedUsername();
// Prompt for login if either:
// 1. the user has not logged in at all or
// 2. if the user is logged in but there is no OAuth2 login token.
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/extensions/app_notify_channel_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698