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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 559 |
560 // Suppress the first run bubble if 'make chrome metro' flow is showing. | 560 // Suppress the first run bubble if 'make chrome metro' flow is showing. |
561 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost) | 561 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost) |
562 return; | 562 return; |
563 | 563 |
564 // Suppress the first run bubble if the NTP sync promo bubble is showing | 564 // Suppress the first run bubble if the NTP sync promo bubble is showing |
565 // or if sign in is in progress. | 565 // or if sign in is in progress. |
566 if (contents->GetURL().host() == chrome::kChromeUINewTabHost) { | 566 if (contents->GetURL().host() == chrome::kChromeUINewTabHost) { |
567 Profile* profile = | 567 Profile* profile = |
568 Profile::FromBrowserContext(contents->GetBrowserContext()); | 568 Profile::FromBrowserContext(contents->GetBrowserContext()); |
569 SigninManager* manager = | 569 SigninManagerBase* manager = |
570 SigninManagerFactory::GetForProfile(profile); | 570 SigninManagerFactory::GetForProfile(profile); |
571 bool signin_in_progress = manager && | 571 bool signin_in_progress = manager && |
572 (!manager->GetAuthenticatedUsername().empty() && | 572 (!manager->GetAuthenticatedUsername().empty() && |
573 SigninTracker::GetSigninState(profile, NULL) != | 573 SigninTracker::GetSigninState(profile, NULL) != |
574 SigninTracker::SIGNIN_COMPLETE); | 574 SigninTracker::SIGNIN_COMPLETE); |
575 bool is_promo_bubble_visible = | 575 bool is_promo_bubble_visible = |
576 profile->GetPrefs()->GetBoolean(prefs::kSyncPromoShowNTPBubble); | 576 profile->GetPrefs()->GetBoolean(prefs::kSyncPromoShowNTPBubble); |
577 | 577 |
578 if (is_promo_bubble_visible || signin_in_progress) | 578 if (is_promo_bubble_visible || signin_in_progress) |
579 return; | 579 return; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 internal::DoPostImportPlatformSpecificTasks(); | 763 internal::DoPostImportPlatformSpecificTasks(); |
764 } | 764 } |
765 | 765 |
766 bool DidPerformProfileImport(bool* exited_successfully) { | 766 bool DidPerformProfileImport(bool* exited_successfully) { |
767 if (exited_successfully) | 767 if (exited_successfully) |
768 *exited_successfully = profile_import_exited_successfully; | 768 *exited_successfully = profile_import_exited_successfully; |
769 return did_perform_profile_import; | 769 return did_perform_profile_import; |
770 } | 770 } |
771 | 771 |
772 } // namespace first_run | 772 } // namespace first_run |
OLD | NEW |