| 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 | 569 |
| 570 // Suppress the first run bubble if 'make chrome metro' flow is showing. | 570 // Suppress the first run bubble if 'make chrome metro' flow is showing. |
| 571 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost) | 571 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost) |
| 572 return; | 572 return; |
| 573 | 573 |
| 574 // Suppress the first run bubble if the NTP sync promo bubble is showing | 574 // Suppress the first run bubble if the NTP sync promo bubble is showing |
| 575 // or if sign in is in progress. | 575 // or if sign in is in progress. |
| 576 if (contents->GetURL().host() == chrome::kChromeUINewTabHost) { | 576 if (contents->GetURL().host() == chrome::kChromeUINewTabHost) { |
| 577 Profile* profile = | 577 Profile* profile = |
| 578 Profile::FromBrowserContext(contents->GetBrowserContext()); | 578 Profile::FromBrowserContext(contents->GetBrowserContext()); |
| 579 SigninManager* manager = | 579 SigninManagerBase* manager = |
| 580 SigninManagerFactory::GetForProfile(profile); | 580 SigninManagerFactory::GetForProfile(profile); |
| 581 bool signin_in_progress = manager && | 581 bool signin_in_progress = manager && |
| 582 (!manager->GetAuthenticatedUsername().empty() && | 582 (!manager->GetAuthenticatedUsername().empty() && |
| 583 SigninTracker::GetSigninState(profile, NULL) != | 583 SigninTracker::GetSigninState(profile, NULL) != |
| 584 SigninTracker::SIGNIN_COMPLETE); | 584 SigninTracker::SIGNIN_COMPLETE); |
| 585 bool is_promo_bubble_visible = | 585 bool is_promo_bubble_visible = |
| 586 profile->GetPrefs()->GetBoolean(prefs::kSyncPromoShowNTPBubble); | 586 profile->GetPrefs()->GetBoolean(prefs::kSyncPromoShowNTPBubble); |
| 587 | 587 |
| 588 if (is_promo_bubble_visible || signin_in_progress) | 588 if (is_promo_bubble_visible || signin_in_progress) |
| 589 return; | 589 return; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 internal::DoPostImportPlatformSpecificTasks(); | 798 internal::DoPostImportPlatformSpecificTasks(); |
| 799 } | 799 } |
| 800 | 800 |
| 801 bool DidPerformProfileImport(bool* exited_successfully) { | 801 bool DidPerformProfileImport(bool* exited_successfully) { |
| 802 if (exited_successfully) | 802 if (exited_successfully) |
| 803 *exited_successfully = profile_import_exited_successfully; | 803 *exited_successfully = profile_import_exited_successfully; |
| 804 return did_perform_profile_import; | 804 return did_perform_profile_import; |
| 805 } | 805 } |
| 806 | 806 |
| 807 } // namespace first_run | 807 } // namespace first_run |
| OLD | NEW |