| 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 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "chrome/browser/profiles/profiles_state.h" | 34 #include "chrome/browser/profiles/profiles_state.h" |
| 35 #include "chrome/browser/search_engines/template_url_service.h" | 35 #include "chrome/browser/search_engines/template_url_service.h" |
| 36 #include "chrome/browser/search_engines/template_url_service_factory.h" | 36 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 37 #include "chrome/browser/shell_integration.h" | 37 #include "chrome/browser/shell_integration.h" |
| 38 #include "chrome/browser/signin/signin_manager.h" | 38 #include "chrome/browser/signin/signin_manager.h" |
| 39 #include "chrome/browser/signin/signin_manager_factory.h" | 39 #include "chrome/browser/signin/signin_manager_factory.h" |
| 40 #include "chrome/browser/signin/signin_promo.h" | 40 #include "chrome/browser/signin/signin_promo.h" |
| 41 #include "chrome/browser/signin/signin_tracker.h" | 41 #include "chrome/browser/signin/signin_tracker.h" |
| 42 #include "chrome/browser/ui/browser.h" | 42 #include "chrome/browser/ui/browser.h" |
| 43 #include "chrome/browser/ui/browser_finder.h" | 43 #include "chrome/browser/ui/browser_finder.h" |
| 44 #include "chrome/browser/ui/chrome_pages.h" |
| 44 #include "chrome/browser/ui/global_error/global_error_service.h" | 45 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 45 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 46 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 46 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 47 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 47 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 48 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 48 #include "chrome/common/chrome_paths.h" | 49 #include "chrome/common/chrome_paths.h" |
| 49 #include "chrome/common/chrome_switches.h" | 50 #include "chrome/common/chrome_switches.h" |
| 50 #include "chrome/common/pref_names.h" | 51 #include "chrome/common/pref_names.h" |
| 51 #include "chrome/common/url_constants.h" | 52 #include "chrome/common/url_constants.h" |
| 52 #include "chrome/installer/util/master_preferences.h" | 53 #include "chrome/installer/util/master_preferences.h" |
| 53 #include "chrome/installer/util/master_preferences_constants.h" | 54 #include "chrome/installer/util/master_preferences_constants.h" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 content::WebContents* contents = | 355 content::WebContents* contents = |
| 355 browser->tab_strip_model()->GetActiveWebContents(); | 356 browser->tab_strip_model()->GetActiveWebContents(); |
| 356 | 357 |
| 357 // Suppress the first run bubble if a Gaia sign in page, the continue | 358 // Suppress the first run bubble if a Gaia sign in page, the continue |
| 358 // URL for the sign in page or the sync setup page is showing. | 359 // URL for the sign in page or the sync setup page is showing. |
| 359 if (contents && | 360 if (contents && |
| 360 (contents->GetURL().GetOrigin().spec() == | 361 (contents->GetURL().GetOrigin().spec() == |
| 361 chrome::kChromeUIChromeSigninURL || | 362 chrome::kChromeUIChromeSigninURL || |
| 362 gaia::IsGaiaSignonRealm(contents->GetURL().GetOrigin()) || | 363 gaia::IsGaiaSignonRealm(contents->GetURL().GetOrigin()) || |
| 363 signin::IsContinueUrlForWebBasedSigninFlow(contents->GetURL()) || | 364 signin::IsContinueUrlForWebBasedSigninFlow(contents->GetURL()) || |
| 364 contents->GetURL() == GURL(std::string(chrome::kChromeUISettingsURL) + | 365 (contents->GetURL() == |
| 365 chrome::kSyncSetupSubPage))) { | 366 chrome::GetSettingsUrl(chrome::kSyncSetupSubPage)))) { |
| 366 return; | 367 return; |
| 367 } | 368 } |
| 368 | 369 |
| 369 if (contents && contents->GetURL().SchemeIs(content::kChromeUIScheme)) { | 370 if (contents && contents->GetURL().SchemeIs(content::kChromeUIScheme)) { |
| 370 // Suppress the first run bubble if 'make chrome metro' flow is showing. | 371 // Suppress the first run bubble if 'make chrome metro' flow is showing. |
| 371 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost) | 372 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost) |
| 372 return; | 373 return; |
| 373 | 374 |
| 374 // Suppress the first run bubble if the NTP sync promo bubble is showing | 375 // Suppress the first run bubble if the NTP sync promo bubble is showing |
| 375 // or if sign in is in progress. | 376 // or if sign in is in progress. |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 SetShouldDoPersonalDataManagerFirstRun(); | 815 SetShouldDoPersonalDataManagerFirstRun(); |
| 815 | 816 |
| 816 internal::DoPostImportPlatformSpecificTasks(profile); | 817 internal::DoPostImportPlatformSpecificTasks(profile); |
| 817 } | 818 } |
| 818 | 819 |
| 819 uint16 auto_import_state() { | 820 uint16 auto_import_state() { |
| 820 return g_auto_import_state; | 821 return g_auto_import_state; |
| 821 } | 822 } |
| 822 | 823 |
| 823 } // namespace first_run | 824 } // namespace first_run |
| OLD | NEW |