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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "apps/app_restore_service.h" 10 #include "apps/app_restore_service.h"
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 865
866 // Special case the FIRST_RUN_LAST_TAB case of the welcome page. 866 // Special case the FIRST_RUN_LAST_TAB case of the welcome page.
867 if (welcome_run_type_ == WelcomeRunType::FIRST_RUN_LAST_TAB) 867 if (welcome_run_type_ == WelcomeRunType::FIRST_RUN_LAST_TAB)
868 startup_urls->push_back(internals::GetWelcomePageURL()); 868 startup_urls->push_back(internals::GetWelcomePageURL());
869 } 869 }
870 870
871 if (signin::ShouldShowPromoAtStartup(profile_, is_first_run_)) { 871 if (signin::ShouldShowPromoAtStartup(profile_, is_first_run_)) {
872 signin::DidShowPromoAtStartup(profile_); 872 signin::DidShowPromoAtStartup(profile_);
873 873
874 const GURL sync_promo_url = signin::GetPromoURL( 874 const GURL sync_promo_url = signin::GetPromoURL(
875 signin_metrics::SOURCE_START_PAGE, false); 875 signin_metrics::AccessPoint::ACCESS_POINT_START_PAGE,
876 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, false);
876 877
877 // No need to add if the sync promo is already in the startup list. 878 // No need to add if the sync promo is already in the startup list.
878 bool add_promo = true; 879 bool add_promo = true;
879 for (std::vector<GURL>::const_iterator it = startup_urls->begin(); 880 for (std::vector<GURL>::const_iterator it = startup_urls->begin();
880 it != startup_urls->end(); ++it) { 881 it != startup_urls->end(); ++it) {
881 if (*it == sync_promo_url) { 882 if (*it == sync_promo_url) {
882 add_promo = false; 883 add_promo = false;
883 break; 884 break;
884 } 885 }
885 } 886 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 #if defined(OS_WIN) 996 #if defined(OS_WIN)
996 TriggeredProfileResetter* triggered_profile_resetter = 997 TriggeredProfileResetter* triggered_profile_resetter =
997 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); 998 TriggeredProfileResetterFactory::GetForBrowserContext(profile_);
998 // TriggeredProfileResetter instance will be nullptr for incognito profiles. 999 // TriggeredProfileResetter instance will be nullptr for incognito profiles.
999 if (triggered_profile_resetter) { 1000 if (triggered_profile_resetter) {
1000 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); 1001 has_reset_trigger = triggered_profile_resetter->HasResetTrigger();
1001 } 1002 }
1002 #endif // defined(OS_WIN) 1003 #endif // defined(OS_WIN)
1003 return has_reset_trigger; 1004 return has_reset_trigger;
1004 } 1005 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698