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 "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 // Reset the preference so we don't show the welcome page next time. | 943 // Reset the preference so we don't show the welcome page next time. |
944 prefs->ClearPref(prefs::kShouldShowWelcomePage); | 944 prefs->ClearPref(prefs::kShouldShowWelcomePage); |
945 startup_urls->push_back(GetWelcomePageURL()); | 945 startup_urls->push_back(GetWelcomePageURL()); |
946 } | 946 } |
947 } | 947 } |
948 | 948 |
949 // If the sync promo page is going to be displayed then insert it at the front | 949 // If the sync promo page is going to be displayed then insert it at the front |
950 // of the list. | 950 // of the list. |
951 if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile_, is_first_run_)) { | 951 if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile_, is_first_run_)) { |
952 GURL continue_url; | 952 GURL continue_url; |
953 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 953 if (!SyncPromoUI::UseWebBasedSigninFlow()) { |
954 switches::kUseWebBasedSigninFlow)) { | |
955 continue_url = GURL(chrome::kChromeUINewTabURL); | 954 continue_url = GURL(chrome::kChromeUINewTabURL); |
956 } | 955 } |
957 | 956 |
958 SyncPromoUI::DidShowSyncPromoAtStartup(profile_); | 957 SyncPromoUI::DidShowSyncPromoAtStartup(profile_); |
959 GURL old_url = (*startup_urls)[0]; | 958 GURL old_url = (*startup_urls)[0]; |
960 (*startup_urls)[0] = | 959 (*startup_urls)[0] = |
961 SyncPromoUI::GetSyncPromoURL(continue_url, | 960 SyncPromoUI::GetSyncPromoURL(continue_url, |
962 SyncPromoUI::SOURCE_START_PAGE, | 961 SyncPromoUI::SOURCE_START_PAGE, |
963 false); | 962 false); |
964 | 963 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 | 1039 |
1041 #if !defined(OS_WIN) || defined(USE_AURA) | 1040 #if !defined(OS_WIN) || defined(USE_AURA) |
1042 // static | 1041 // static |
1043 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( | 1042 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( |
1044 Profile* profile, | 1043 Profile* profile, |
1045 const std::vector<GURL>& startup_urls) { | 1044 const std::vector<GURL>& startup_urls) { |
1046 return false; | 1045 return false; |
1047 } | 1046 } |
1048 #endif | 1047 #endif |
1049 | 1048 |
OLD | NEW |