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

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

Issue 547063003: Remove the unmaintained performance monitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('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/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 22 matching lines...) Expand all
33 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 33 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
34 #include "chrome/browser/defaults.h" 34 #include "chrome/browser/defaults.h"
35 #include "chrome/browser/extensions/extension_creator.h" 35 #include "chrome/browser/extensions/extension_creator.h"
36 #include "chrome/browser/extensions/extension_util.h" 36 #include "chrome/browser/extensions/extension_util.h"
37 #include "chrome/browser/extensions/launch_util.h" 37 #include "chrome/browser/extensions/launch_util.h"
38 #include "chrome/browser/extensions/pack_extension_job.h" 38 #include "chrome/browser/extensions/pack_extension_job.h"
39 #include "chrome/browser/first_run/first_run.h" 39 #include "chrome/browser/first_run/first_run.h"
40 #include "chrome/browser/infobars/infobar_service.h" 40 #include "chrome/browser/infobars/infobar_service.h"
41 #include "chrome/browser/net/predictor.h" 41 #include "chrome/browser/net/predictor.h"
42 #include "chrome/browser/notifications/desktop_notification_service.h" 42 #include "chrome/browser/notifications/desktop_notification_service.h"
43 #include "chrome/browser/performance_monitor/startup_timer.h"
44 #include "chrome/browser/prefs/incognito_mode_prefs.h" 43 #include "chrome/browser/prefs/incognito_mode_prefs.h"
45 #include "chrome/browser/prefs/session_startup_pref.h" 44 #include "chrome/browser/prefs/session_startup_pref.h"
46 #include "chrome/browser/profiles/profile.h" 45 #include "chrome/browser/profiles/profile.h"
47 #include "chrome/browser/profiles/profile_io_data.h" 46 #include "chrome/browser/profiles/profile_io_data.h"
48 #include "chrome/browser/rlz/rlz.h" 47 #include "chrome/browser/rlz/rlz.h"
49 #include "chrome/browser/sessions/session_restore.h" 48 #include "chrome/browser/sessions/session_restore.h"
50 #include "chrome/browser/sessions/session_service.h" 49 #include "chrome/browser/sessions/session_service.h"
51 #include "chrome/browser/sessions/session_service_factory.h" 50 #include "chrome/browser/sessions/session_service_factory.h"
52 #include "chrome/browser/shell_integration.h" 51 #include "chrome/browser/shell_integration.h"
53 #include "chrome/browser/signin/signin_promo.h" 52 #include "chrome/browser/signin/signin_promo.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 #if defined(OS_MACOSX) 626 #if defined(OS_MACOSX)
628 // On Mac, when restoring a session with no windows, suppress the creation 627 // On Mac, when restoring a session with no windows, suppress the creation
629 // of a new window in the case where the system is launching Chrome via a 628 // of a new window in the case where the system is launching Chrome via a
630 // login item or Lion's resume feature. 629 // login item or Lion's resume feature.
631 if (base::mac::WasLaunchedAsLoginOrResumeItem()) { 630 if (base::mac::WasLaunchedAsLoginOrResumeItem()) {
632 restore_behavior = restore_behavior & 631 restore_behavior = restore_behavior &
633 ~SessionRestore::ALWAYS_CREATE_TABBED_BROWSER; 632 ~SessionRestore::ALWAYS_CREATE_TABBED_BROWSER;
634 } 633 }
635 #endif 634 #endif
636 635
637 // Pause the StartupTimer. Since the restore here is synchronous, we can
638 // keep these two metrics (browser startup time and session restore time)
639 // separate.
640 performance_monitor::StartupTimer::PauseTimer();
641
642 // The startup code only executes for browsers launched in desktop mode. 636 // The startup code only executes for browsers launched in desktop mode.
643 // i.e. HOST_DESKTOP_TYPE_NATIVE. Ash should never get here. 637 // i.e. HOST_DESKTOP_TYPE_NATIVE. Ash should never get here.
644 Browser* browser = SessionRestore::RestoreSession( 638 Browser* browser = SessionRestore::RestoreSession(
645 profile_, NULL, desktop_type, restore_behavior, 639 profile_, NULL, desktop_type, restore_behavior,
646 urls_to_open); 640 urls_to_open);
647 641
648 performance_monitor::StartupTimer::UnpauseTimer();
649
650 AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP); 642 AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP);
651 return true; 643 return true;
652 } 644 }
653 645
654 Browser* browser = ProcessSpecifiedURLs(urls_to_open, desktop_type); 646 Browser* browser = ProcessSpecifiedURLs(urls_to_open, desktop_type);
655 if (!browser) 647 if (!browser)
656 return false; 648 return false;
657 649
658 AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP); 650 AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP);
659 651
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 // behavior is desired because completing or skipping the sync promo 907 // behavior is desired because completing or skipping the sync promo
916 // causes a redirect to the NTP. 908 // causes a redirect to the NTP.
917 if (!startup_urls->empty() && 909 if (!startup_urls->empty() &&
918 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) 910 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL))
919 startup_urls->at(0) = sync_promo_url; 911 startup_urls->at(0) = sync_promo_url;
920 else 912 else
921 startup_urls->insert(startup_urls->begin(), sync_promo_url); 913 startup_urls->insert(startup_urls->begin(), sync_promo_url);
922 } 914 }
923 } 915 }
924 } 916 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698