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

Unified Diff: chrome/browser/android/profiles/profile_downloader_android.cc

Issue 310853004: [Android][Mirror] Ignore cached "default" names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/profiles/profile_downloader_android.cc
diff --git a/chrome/browser/android/profiles/profile_downloader_android.cc b/chrome/browser/android/profiles/profile_downloader_android.cc
index 0ec319952ffc16825d5df877a1dcc725111c3bbc..b49a808d1f704fc90c6ac0ae83171b69c07b2f63 100644
--- a/chrome/browser/android/profiles/profile_downloader_android.cc
+++ b/chrome/browser/android/profiles/profile_downloader_android.cc
@@ -116,7 +116,9 @@ jstring GetCachedNameForPrimaryAccount(JNIEnv* env,
const size_t index = info.GetIndexOfProfileWithPath(profile->GetPath());
base::string16 name;
- if (index != std::string::npos) {
+
+ if (index != std::string::npos &&
+ !info.ProfileIsUsingDefaultNameAtIndex(index)) {
name = info.GetGAIANameOfProfileAtIndex(index);
if (name.empty())
name = info.GetNameOfProfileAtIndex(index);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698