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

Unified Diff: chrome/browser/chrome_browser_main_mac.mm

Issue 10561009: Consolidate RecordBrowserStartupTime() into one location (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix review comments - utilize Time::is_null() Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_browser_main_mac.mm
diff --git a/chrome/browser/chrome_browser_main_mac.mm b/chrome/browser/chrome_browser_main_mac.mm
index 71edcc645337a95a925a9c82d4829f7904b209fe..b7a685ff479cfbc00754b19ed38dc81807418b35 100644
--- a/chrome/browser/chrome_browser_main_mac.mm
+++ b/chrome/browser/chrome_browser_main_mac.mm
@@ -5,8 +5,6 @@
#include "chrome/browser/chrome_browser_main_mac.h"
#import <Cocoa/Cocoa.h>
-#include <sys/sysctl.h>
-#include <sys/time.h>
#include "base/command_line.h"
#include "base/debug/debugger.h"
@@ -14,7 +12,6 @@
#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
#include "base/memory/scoped_nsobject.h"
-#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "chrome/app/breakpad_mac.h"
#import "chrome/browser/app_controller_mac.h"
@@ -58,23 +55,6 @@ void RecordBreakpadStatusUMA(MetricsService* metrics) {
metrics->RecordBreakpadHasDebugger(base::debug::BeingDebugged());
}
-void RecordBrowserStartupTime() {
- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
- size_t len = 0;
- if (sysctl(mib, arraysize(mib), NULL, &len, NULL, 0) < 0)
- return;
-
- scoped_ptr_malloc<struct kinfo_proc>
- proc(static_cast<struct kinfo_proc*>(malloc(len)));
- if (sysctl(mib, arraysize(mib), proc.get(), &len, NULL, 0) < 0)
- return;
- base::Time process_creation_time =
- base::Time::FromTimeVal(proc->kp_proc.p_un.__p_starttime);
-
- RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime",
- base::Time::Now() - process_creation_time);
-}
-
void WarnAboutMinimumSystemRequirements() {
// Nothing to check for on Mac right now.
}

Powered by Google App Engine
This is Rietveld 408576698