OLD | NEW |
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 Loading... |
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::ACCESS_POINT_START_PAGE, |
| 876 signin_metrics::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 Loading... |
995 TriggeredProfileResetter* triggered_profile_resetter = | 996 TriggeredProfileResetter* triggered_profile_resetter = |
996 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 997 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
997 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 998 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
998 if (triggered_profile_resetter) { | 999 if (triggered_profile_resetter) { |
999 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1000 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
1000 triggered_profile_resetter->ClearResetTrigger(); | 1001 triggered_profile_resetter->ClearResetTrigger(); |
1001 } | 1002 } |
1002 #endif // defined(OS_WIN) | 1003 #endif // defined(OS_WIN) |
1003 return has_reset_trigger; | 1004 return has_reset_trigger; |
1004 } | 1005 } |
OLD | NEW |