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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 11316299: Enable web-based sign in flow by default. Can use command line argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years 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/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "chrome/browser/ui/browser_tabrestore.h" 58 #include "chrome/browser/ui/browser_tabrestore.h"
59 #include "chrome/browser/ui/browser_tabstrip.h" 59 #include "chrome/browser/ui/browser_tabstrip.h"
60 #include "chrome/browser/ui/browser_window.h" 60 #include "chrome/browser/ui/browser_window.h"
61 #include "chrome/browser/ui/extensions/application_launch.h" 61 #include "chrome/browser/ui/extensions/application_launch.h"
62 #include "chrome/browser/ui/startup/autolaunch_prompt.h" 62 #include "chrome/browser/ui/startup/autolaunch_prompt.h"
63 #include "chrome/browser/ui/startup/bad_flags_prompt.h" 63 #include "chrome/browser/ui/startup/bad_flags_prompt.h"
64 #include "chrome/browser/ui/startup/default_browser_prompt.h" 64 #include "chrome/browser/ui/startup/default_browser_prompt.h"
65 #include "chrome/browser/ui/startup/obsolete_os_prompt.h" 65 #include "chrome/browser/ui/startup/obsolete_os_prompt.h"
66 #include "chrome/browser/ui/startup/session_crashed_prompt.h" 66 #include "chrome/browser/ui/startup/session_crashed_prompt.h"
67 #include "chrome/browser/ui/startup/startup_browser_creator.h" 67 #include "chrome/browser/ui/startup/startup_browser_creator.h"
68 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
68 #include "chrome/browser/ui/tab_contents/tab_contents.h" 69 #include "chrome/browser/ui/tab_contents/tab_contents.h"
69 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" 70 #include "chrome/browser/ui/tabs/pinned_tab_codec.h"
70 #include "chrome/browser/ui/tabs/tab_strip_model.h" 71 #include "chrome/browser/ui/tabs/tab_strip_model.h"
71 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" 72 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
72 #include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h" 73 #include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h"
73 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" 74 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h"
74 #include "chrome/common/chrome_constants.h" 75 #include "chrome/common/chrome_constants.h"
75 #include "chrome/common/chrome_notification_types.h" 76 #include "chrome/common/chrome_notification_types.h"
76 #include "chrome/common/chrome_paths.h" 77 #include "chrome/common/chrome_paths.h"
77 #include "chrome/common/chrome_result_codes.h" 78 #include "chrome/common/chrome_result_codes.h"
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 // Reset the preference so we don't show the welcome page next time. 959 // Reset the preference so we don't show the welcome page next time.
959 prefs->ClearPref(prefs::kShouldShowWelcomePage); 960 prefs->ClearPref(prefs::kShouldShowWelcomePage);
960 startup_urls->push_back(GetWelcomePageURL()); 961 startup_urls->push_back(GetWelcomePageURL());
961 } 962 }
962 } 963 }
963 964
964 // If the sync promo page is going to be displayed then insert it at the front 965 // If the sync promo page is going to be displayed then insert it at the front
965 // of the list. 966 // of the list.
966 if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile_, is_first_run_)) { 967 if (SyncPromoUI::ShouldShowSyncPromoAtStartup(profile_, is_first_run_)) {
967 GURL continue_url; 968 GURL continue_url;
968 if (!CommandLine::ForCurrentProcess()->HasSwitch( 969 if (!OneClickSigninHelper::UseWebBasedSigninFlow()) {
969 switches::kUseWebBasedSigninFlow)) {
970 continue_url = GURL(chrome::kChromeUINewTabURL); 970 continue_url = GURL(chrome::kChromeUINewTabURL);
971 } 971 }
972 972
973 SyncPromoUI::DidShowSyncPromoAtStartup(profile_); 973 SyncPromoUI::DidShowSyncPromoAtStartup(profile_);
974 GURL old_url = (*startup_urls)[0]; 974 GURL old_url = (*startup_urls)[0];
975 (*startup_urls)[0] = 975 (*startup_urls)[0] =
976 SyncPromoUI::GetSyncPromoURL(continue_url, 976 SyncPromoUI::GetSyncPromoURL(continue_url,
977 SyncPromoUI::SOURCE_START_PAGE, 977 SyncPromoUI::SOURCE_START_PAGE,
978 false); 978 false);
979 979
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 1055
1056 #if !defined(OS_WIN) || defined(USE_AURA) 1056 #if !defined(OS_WIN) || defined(USE_AURA)
1057 // static 1057 // static
1058 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( 1058 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser(
1059 Profile* profile, 1059 Profile* profile,
1060 const std::vector<GURL>& startup_urls) { 1060 const std::vector<GURL>& startup_urls) {
1061 return false; 1061 return false;
1062 } 1062 }
1063 #endif 1063 #endif
1064 1064
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698