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

Side by Side Diff: chrome/browser/signin/chrome_signin_status_metrics_provider_delegate.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/chrome_signin_status_metrics_provider_delegate.h " 5 #include "chrome/browser/signin/chrome_signin_status_metrics_provider_delegate.h "
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 AccountsStatus 51 AccountsStatus
52 ChromeSigninStatusMetricsProviderDelegate::GetStatusOfAllAccounts() { 52 ChromeSigninStatusMetricsProviderDelegate::GetStatusOfAllAccounts() {
53 ProfileManager* profile_manager = g_browser_process->profile_manager(); 53 ProfileManager* profile_manager = g_browser_process->profile_manager();
54 std::vector<Profile*> profile_list = profile_manager->GetLoadedProfiles(); 54 std::vector<Profile*> profile_list = profile_manager->GetLoadedProfiles();
55 55
56 AccountsStatus accounts_status; 56 AccountsStatus accounts_status;
57 accounts_status.num_accounts = profile_list.size(); 57 accounts_status.num_accounts = profile_list.size();
58 for (Profile* profile : profile_list) { 58 for (Profile* profile : profile_list) {
59 #if !defined(OS_ANDROID) && !defined(OS_IOS) 59 #if !defined(OS_ANDROID) && !defined(OS_IOS)
60 if (chrome::GetTotalBrowserCountForProfile(profile) == 0) { 60 if (chrome::GetBrowserCount(profile) == 0) {
61 // The profile is loaded, but there's no opened browser for this profile. 61 // The profile is loaded, but there's no opened browser for this profile.
62 continue; 62 continue;
63 } 63 }
64 #endif 64 #endif
65 accounts_status.num_opened_accounts++; 65 accounts_status.num_opened_accounts++;
66 66
67 SigninManager* manager = 67 SigninManager* manager =
68 SigninManagerFactory::GetForProfile(profile->GetOriginalProfile()); 68 SigninManagerFactory::GetForProfile(profile->GetOriginalProfile());
69 if (manager && manager->IsAuthenticated()) 69 if (manager && manager->IsAuthenticated())
70 accounts_status.num_signed_in_accounts++; 70 accounts_status.num_signed_in_accounts++;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // will be reset to |UNKNOWN_SIGNIN_STATUS|. Then this newly added browser 132 // will be reset to |UNKNOWN_SIGNIN_STATUS|. Then this newly added browser
133 // is the only opened browser/profile and its signin status represents 133 // is the only opened browser/profile and its signin status represents
134 // the whole status. 134 // the whole status.
135 owner()->UpdateSigninStatus( 135 owner()->UpdateSigninStatus(
136 signed_in 136 signed_in
137 ? SigninStatusMetricsProviderBase::ALL_PROFILES_SIGNED_IN 137 ? SigninStatusMetricsProviderBase::ALL_PROFILES_SIGNED_IN
138 : SigninStatusMetricsProviderBase::ALL_PROFILES_NOT_SIGNED_IN); 138 : SigninStatusMetricsProviderBase::ALL_PROFILES_NOT_SIGNED_IN);
139 } 139 }
140 #endif 140 #endif
141 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/srt_fetcher_win.cc ('k') | chrome/browser/sync/test/integration/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698