Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: chrome/browser/first_run/first_run.cc

Issue 12502017: signin: pull basic SigninManager functionality into new SigninManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deal with new enterprise_platform_keys_private_api Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698