| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 } | 828 } |
| 829 } | 829 } |
| 830 | 830 |
| 831 // If the sync promo page is going to be displayed then insert it at the front | 831 // If the sync promo page is going to be displayed then insert it at the front |
| 832 // of the list. | 832 // of the list. |
| 833 if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile_, is_first_run_)) { | 833 if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile_, is_first_run_)) { |
| 834 SyncPromoUI::DidShowSyncPromoAtStartup(profile_); | 834 SyncPromoUI::DidShowSyncPromoAtStartup(profile_); |
| 835 GURL old_url = (*startup_urls)[0]; | 835 GURL old_url = (*startup_urls)[0]; |
| 836 (*startup_urls)[0] = | 836 (*startup_urls)[0] = |
| 837 SyncPromoUI::GetSyncPromoURL(GURL(chrome::kChromeUINewTabURL), | 837 SyncPromoUI::GetSyncPromoURL(GURL(chrome::kChromeUINewTabURL), |
| 838 SyncPromoUI::SOURCE_START_PAGE); | 838 SyncPromoUI::SOURCE_START_PAGE, |
| 839 false); |
| 839 | 840 |
| 840 // An empty URL means to go to the home page. | 841 // An empty URL means to go to the home page. |
| 841 if (old_url.is_empty() && | 842 if (old_url.is_empty() && |
| 842 profile_->GetHomePage() == GURL(chrome::kChromeUINewTabURL)) { | 843 profile_->GetHomePage() == GURL(chrome::kChromeUINewTabURL)) { |
| 843 old_url = GURL(chrome::kChromeUINewTabURL); | 844 old_url = GURL(chrome::kChromeUINewTabURL); |
| 844 } | 845 } |
| 845 | 846 |
| 846 // If the old URL is not the NTP then insert it right after the sync promo. | 847 // If the old URL is not the NTP then insert it right after the sync promo. |
| 847 if (old_url != GURL(chrome::kChromeUINewTabURL)) | 848 if (old_url != GURL(chrome::kChromeUINewTabURL)) |
| 848 startup_urls->insert(startup_urls->begin() + 1, old_url); | 849 startup_urls->insert(startup_urls->begin() + 1, old_url); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 // New: | 906 // New: |
| 906 prefs->GetString(prefs::kHomePage), | 907 prefs->GetString(prefs::kHomePage), |
| 907 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), | 908 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), |
| 908 prefs->GetBoolean(prefs::kShowHomeButton), | 909 prefs->GetBoolean(prefs::kShowHomeButton), |
| 909 // Backup: | 910 // Backup: |
| 910 backup_homepage, | 911 backup_homepage, |
| 911 backup_homepage_is_ntp, | 912 backup_homepage_is_ntp, |
| 912 backup_show_home_button)); | 913 backup_show_home_button)); |
| 913 } | 914 } |
| 914 } | 915 } |
| OLD | NEW |