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

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

Issue 287653004: Schedule posttask to decide Uma optin option offering (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update comments Created 6 years, 7 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/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 "apps/app_restore_service.h" 10 #include "apps/app_restore_service.h"
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 return browser; 838 return browser;
839 } 839 }
840 840
841 void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( 841 void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary(
842 Browser* browser, 842 Browser* browser,
843 chrome::startup::IsProcessStartup is_process_startup) { 843 chrome::startup::IsProcessStartup is_process_startup) {
844 if (!browser || !profile_ || browser->tab_strip_model()->count() == 0) 844 if (!browser || !profile_ || browser->tab_strip_model()->count() == 0)
845 return; 845 return;
846 846
847 if (HasPendingUncleanExit(browser->profile())) { 847 if (HasPendingUncleanExit(browser->profile())) {
848 if (!command_line_.HasSwitch(switches::kEnableSessionCrashedBubble) || 848 if (!CommandLine::ForCurrentProcess()->HasSwitch(
Alexei Svitkine (slow) 2014/05/14 14:09:57 Is there a reason you're changing this part?
yao 2014/05/14 14:53:28 yes, In the situation where there are multiple pro
Alexei Svitkine (slow) 2014/05/14 15:02:54 That's very surprising. Can you do a little invest
yao 2014/05/14 21:00:26 I believe here is the cause: https://code.google.c
849 switches::kEnableSessionCrashedBubble) ||
849 !ShowSessionCrashedBubble(browser)) 850 !ShowSessionCrashedBubble(browser))
850 SessionCrashedInfoBarDelegate::Create(browser); 851 SessionCrashedInfoBarDelegate::Create(browser);
851 } 852 }
852 853
853 // The below info bars are only added to the first profile which is launched. 854 // The below info bars are only added to the first profile which is launched.
854 // Other profiles might be restoring the browsing sessions asynchronously, 855 // Other profiles might be restoring the browsing sessions asynchronously,
855 // so we cannot add the info bars to the focused tabs here. 856 // so we cannot add the info bars to the focused tabs here.
856 if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP && 857 if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP &&
857 !command_line_.HasSwitch(switches::kTestType)) { 858 !command_line_.HasSwitch(switches::kTestType)) {
858 chrome::ShowBadFlagsPrompt(browser); 859 chrome::ShowBadFlagsPrompt(browser);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 // If the first URL is the NTP, replace it with the sync promo. This 934 // If the first URL is the NTP, replace it with the sync promo. This
934 // behavior is desired because completing or skipping the sync promo 935 // behavior is desired because completing or skipping the sync promo
935 // causes a redirect to the NTP. 936 // causes a redirect to the NTP.
936 if (!startup_urls->empty() && IsNewTabURL(profile_, startup_urls->at(0))) 937 if (!startup_urls->empty() && IsNewTabURL(profile_, startup_urls->at(0)))
937 startup_urls->at(0) = sync_promo_url; 938 startup_urls->at(0) = sync_promo_url;
938 else 939 else
939 startup_urls->insert(startup_urls->begin(), sync_promo_url); 940 startup_urls->insert(startup_urls->begin(), sync_promo_url);
940 } 941 }
941 } 942 }
942 } 943 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698