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

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

Issue 19567004: Convert SigninTracker to use OAuth2TokenService notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/signin/fake_profile_oauth2_token_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost) 381 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost)
382 return; 382 return;
383 383
384 // Suppress the first run bubble if the NTP sync promo bubble is showing 384 // Suppress the first run bubble if the NTP sync promo bubble is showing
385 // or if sign in is in progress. 385 // or if sign in is in progress.
386 if (contents->GetURL().host() == chrome::kChromeUINewTabHost) { 386 if (contents->GetURL().host() == chrome::kChromeUINewTabHost) {
387 Profile* profile = 387 Profile* profile =
388 Profile::FromBrowserContext(contents->GetBrowserContext()); 388 Profile::FromBrowserContext(contents->GetBrowserContext());
389 SigninManagerBase* manager = 389 SigninManagerBase* manager =
390 SigninManagerFactory::GetForProfile(profile); 390 SigninManagerFactory::GetForProfile(profile);
391 bool signin_in_progress = manager && 391 bool signin_in_progress = manager && manager->AuthInProgress();
392 (!manager->GetAuthenticatedUsername().empty() &&
393 SigninTracker::GetSigninState(profile, NULL) !=
394 SigninTracker::SIGNIN_COMPLETE);
395 bool is_promo_bubble_visible = 392 bool is_promo_bubble_visible =
396 profile->GetPrefs()->GetBoolean(prefs::kSignInPromoShowNTPBubble); 393 profile->GetPrefs()->GetBoolean(prefs::kSignInPromoShowNTPBubble);
397 394
398 if (is_promo_bubble_visible || signin_in_progress) 395 if (is_promo_bubble_visible || signin_in_progress)
399 return; 396 return;
400 } 397 }
401 } 398 }
402 399
403 // Suppress the first run bubble if a global error bubble is pending. 400 // Suppress the first run bubble if a global error bubble is pending.
404 GlobalErrorService* global_error_service = 401 GlobalErrorService* global_error_service =
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 SetShouldDoPersonalDataManagerFirstRun(); 813 SetShouldDoPersonalDataManagerFirstRun();
817 814
818 internal::DoPostImportPlatformSpecificTasks(profile); 815 internal::DoPostImportPlatformSpecificTasks(profile);
819 } 816 }
820 817
821 uint16 auto_import_state() { 818 uint16 auto_import_state() {
822 return g_auto_import_state; 819 return g_auto_import_state;
823 } 820 }
824 821
825 } // namespace first_run 822 } // namespace first_run
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/fake_profile_oauth2_token_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698