| 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/first_run/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 const GURL deprecated_welcome_page( | 335 const GURL deprecated_welcome_page( |
| 336 l10n_util::GetStringUTF8(IDS_WELCOME_PAGE_URL)); | 336 l10n_util::GetStringUTF8(IDS_WELCOME_PAGE_URL)); |
| 337 if (contents->GetURL() == deprecated_welcome_page || | 337 if (contents->GetURL() == deprecated_welcome_page || |
| 338 (contents->GetController().GetVisibleEntry() && | 338 (contents->GetController().GetVisibleEntry() && |
| 339 contents->GetController().GetVisibleEntry()->GetOriginalRequestURL() == | 339 contents->GetController().GetVisibleEntry()->GetOriginalRequestURL() == |
| 340 deprecated_welcome_page)) { | 340 deprecated_welcome_page)) { |
| 341 return true; | 341 return true; |
| 342 } | 342 } |
| 343 | 343 |
| 344 const GURL welcome_page(chrome::kChromeUIWelcomeURL); | 344 const GURL welcome_page(chrome::kChromeUIWelcomeURL); |
| 345 return contents->GetURL().GetWithEmptyPath() == welcome_page; | 345 const GURL welcome_page_win10(chrome::kChromeUIWelcomeWin10URL); |
| 346 const GURL current = contents->GetURL().GetWithEmptyPath(); |
| 347 return current == welcome_page || current == welcome_page_win10; |
| 346 } | 348 } |
| 347 | 349 |
| 348 // Show the first run search engine bubble at the first appropriate opportunity. | 350 // Show the first run search engine bubble at the first appropriate opportunity. |
| 349 // This bubble may be delayed by other UI, like global errors and sync promos. | 351 // This bubble may be delayed by other UI, like global errors and sync promos. |
| 350 class FirstRunBubbleLauncher : public content::NotificationObserver { | 352 class FirstRunBubbleLauncher : public content::NotificationObserver { |
| 351 public: | 353 public: |
| 352 // Show the bubble at the first appropriate opportunity. This function | 354 // Show the bubble at the first appropriate opportunity. This function |
| 353 // instantiates a FirstRunBubbleLauncher, which manages its own lifetime. | 355 // instantiates a FirstRunBubbleLauncher, which manages its own lifetime. |
| 354 static void ShowFirstRunBubbleSoon(); | 356 static void ShowFirstRunBubbleSoon(); |
| 355 | 357 |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 SetShouldDoPersonalDataManagerFirstRun(); | 859 SetShouldDoPersonalDataManagerFirstRun(); |
| 858 | 860 |
| 859 internal::DoPostImportPlatformSpecificTasks(profile); | 861 internal::DoPostImportPlatformSpecificTasks(profile); |
| 860 } | 862 } |
| 861 | 863 |
| 862 uint16_t auto_import_state() { | 864 uint16_t auto_import_state() { |
| 863 return g_auto_import_state; | 865 return g_auto_import_state; |
| 864 } | 866 } |
| 865 | 867 |
| 866 } // namespace first_run | 868 } // namespace first_run |
| OLD | NEW |