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

Unified Diff: chrome/browser/chromeos/profiles/profile_util.cc

Issue 218903005: Make push messaging not create InvalidationService for login and guest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix telemetry unit tests. Created 6 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
Index: chrome/browser/chromeos/profiles/profile_util.cc
diff --git a/chrome/browser/chromeos/profiles/profile_util.cc b/chrome/browser/chromeos/profiles/profile_util.cc
index 25222ba124232d60fc5402f4dced02e3db2d6aae..db5e1ca8b7d6deea5b261e9632dae3a80f25a1cb 100644
--- a/chrome/browser/chromeos/profiles/profile_util.cc
+++ b/chrome/browser/chromeos/profiles/profile_util.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/profiles/profile_util.h"
+#include "base/files/file_path.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chromeos/login/login_state.h"
@@ -16,6 +18,12 @@ bool IsProfileAssociatedWithGaiaAccount(Profile* profile) {
return false;
if (profile->IsOffTheRecord())
return false;
+ // Using ProfileHelper::GetSigninProfile() here would lead to an infinite loop
Nikita (slow) 2014/04/03 15:15:25 nit: insert empty line before comment.
bartfab (slow) 2014/04/03 15:23:34 Done.
+ // when this method is called during the creation of the sign-in profile
+ // itself. Using ProfileHelper::GetSigninProfileDir() is safe because it does
+ // not try to access the sign-in profile.
+ if (profile->GetPath() == ProfileHelper::GetSigninProfileDir())
+ return false;
return true;
}
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/extensions/api/push_messaging/push_messaging_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698