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

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

Issue 872433006: Disconnect one click sign in code. The code itself will be removed in followup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge Created 5 years, 10 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
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 18 matching lines...) Expand all
29 #include "chrome/browser/importer/importer_list.h" 29 #include "chrome/browser/importer/importer_list.h"
30 #include "chrome/browser/importer/importer_progress_observer.h" 30 #include "chrome/browser/importer/importer_progress_observer.h"
31 #include "chrome/browser/importer/importer_uma.h" 31 #include "chrome/browser/importer/importer_uma.h"
32 #include "chrome/browser/importer/profile_writer.h" 32 #include "chrome/browser/importer/profile_writer.h"
33 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 33 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
34 #include "chrome/browser/profiles/profile.h" 34 #include "chrome/browser/profiles/profile.h"
35 #include "chrome/browser/profiles/profiles_state.h" 35 #include "chrome/browser/profiles/profiles_state.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_factory.h" 38 #include "chrome/browser/signin/signin_manager_factory.h"
39 #include "chrome/browser/signin/signin_promo.h"
40 #include "chrome/browser/ui/browser.h" 39 #include "chrome/browser/ui/browser.h"
41 #include "chrome/browser/ui/browser_finder.h" 40 #include "chrome/browser/ui/browser_finder.h"
42 #include "chrome/browser/ui/chrome_pages.h" 41 #include "chrome/browser/ui/chrome_pages.h"
43 #include "chrome/browser/ui/global_error/global_error_service.h" 42 #include "chrome/browser/ui/global_error/global_error_service.h"
44 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 43 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
45 #include "chrome/browser/ui/tabs/tab_strip_model.h" 44 #include "chrome/browser/ui/tabs/tab_strip_model.h"
46 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 45 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
47 #include "chrome/common/chrome_constants.h" 46 #include "chrome/common/chrome_constants.h"
48 #include "chrome/common/chrome_paths.h" 47 #include "chrome/common/chrome_paths.h"
49 #include "chrome/common/chrome_switches.h" 48 #include "chrome/common/chrome_switches.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 PrefService* prefs = g_browser_process->local_state(); 357 PrefService* prefs = g_browser_process->local_state();
359 if (!prefs || prefs->GetInteger(prefs::kShowFirstRunBubbleOption) != 358 if (!prefs || prefs->GetInteger(prefs::kShowFirstRunBubbleOption) !=
360 first_run::FIRST_RUN_BUBBLE_SHOW) { 359 first_run::FIRST_RUN_BUBBLE_SHOW) {
361 delete this; 360 delete this;
362 return; 361 return;
363 } 362 }
364 363
365 content::WebContents* contents = 364 content::WebContents* contents =
366 browser->tab_strip_model()->GetActiveWebContents(); 365 browser->tab_strip_model()->GetActiveWebContents();
367 366
368 // Suppress the first run bubble if a Gaia sign in page, the continue 367 // Suppress the first run bubble if a Gaia sign in page or the sync setup
369 // URL for the sign in page or the sync setup page is showing. 368 // page is showing.
370 if (contents && 369 if (contents &&
371 (contents->GetURL().GetOrigin().spec() == 370 (contents->GetURL().GetOrigin().spec() ==
372 chrome::kChromeUIChromeSigninURL || 371 chrome::kChromeUIChromeSigninURL ||
373 gaia::IsGaiaSignonRealm(contents->GetURL().GetOrigin()) || 372 gaia::IsGaiaSignonRealm(contents->GetURL().GetOrigin()) ||
374 signin::IsContinueUrlForWebBasedSigninFlow(contents->GetURL()) || 373 contents->GetURL() ==
375 (contents->GetURL() == 374 chrome::GetSettingsUrl(chrome::kSyncSetupSubPage))) {
376 chrome::GetSettingsUrl(chrome::kSyncSetupSubPage)))) {
377 return; 375 return;
378 } 376 }
379 377
380 if (contents && contents->GetURL().SchemeIs(content::kChromeUIScheme)) { 378 if (contents && contents->GetURL().SchemeIs(content::kChromeUIScheme)) {
381 // Suppress the first run bubble if 'make chrome metro' flow is showing. 379 // Suppress the first run bubble if 'make chrome metro' flow is showing.
382 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost) 380 if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost)
383 return; 381 return;
384 382
385 // Suppress the first run bubble if the NTP sync promo bubble is showing 383 // Suppress the first run bubble if the NTP sync promo bubble is showing
386 // or if sign in is in progress. 384 // or if sign in is in progress.
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 SetShouldDoPersonalDataManagerFirstRun(); 805 SetShouldDoPersonalDataManagerFirstRun();
808 806
809 internal::DoPostImportPlatformSpecificTasks(profile); 807 internal::DoPostImportPlatformSpecificTasks(profile);
810 } 808 }
811 809
812 uint16 auto_import_state() { 810 uint16 auto_import_state() {
813 return g_auto_import_state; 811 return g_auto_import_state;
814 } 812 }
815 813
816 } // namespace first_run 814 } // namespace first_run
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/password_manager/save_password_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698