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

Side by Side Diff: chrome/browser/metrics/first_web_contents_profiler.cc

Issue 1431053003: Revert of Move components/startup_metric_utils/* to components/startup_metric_utils/browser/*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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/mac/mac_startup_profiler.cc ('k') | chrome/browser/ui/browser.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #if !defined(OS_ANDROID) 5 #if !defined(OS_ANDROID)
6 6
7 #include "chrome/browser/metrics/first_web_contents_profiler.h" 7 #include "chrome/browser/metrics/first_web_contents_profiler.h"
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/metrics/histogram_macros.h" 13 #include "base/metrics/histogram_macros.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_iterator.h" 16 #include "chrome/browser/ui/browser_iterator.h"
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" 17 #include "chrome/browser/ui/tabs/tab_strip_model.h"
18 #include "components/metrics/profiler/tracking_synchronizer.h" 18 #include "components/metrics/profiler/tracking_synchronizer.h"
19 #include "components/metrics/proto/profiler_event.pb.h" 19 #include "components/metrics/proto/profiler_event.pb.h"
20 #include "components/startup_metric_utils/browser/startup_metric_utils.h" 20 #include "components/startup_metric_utils/startup_metric_utils.h"
21 #include "content/public/browser/navigation_handle.h" 21 #include "content/public/browser/navigation_handle.h"
22 22
23 scoped_ptr<FirstWebContentsProfiler> 23 scoped_ptr<FirstWebContentsProfiler>
24 FirstWebContentsProfiler::CreateProfilerForFirstWebContents( 24 FirstWebContentsProfiler::CreateProfilerForFirstWebContents(
25 Delegate* delegate) { 25 Delegate* delegate) {
26 DCHECK(delegate); 26 DCHECK(delegate);
27 for (chrome::BrowserIterator iterator; !iterator.done(); iterator.Next()) { 27 for (chrome::BrowserIterator iterator; !iterator.done(); iterator.Next()) {
28 Browser* browser = *iterator; 28 Browser* browser = *iterator;
29 content::WebContents* web_contents = 29 content::WebContents* web_contents =
30 browser->tab_strip_model()->GetActiveWebContents(); 30 browser->tab_strip_model()->GetActiveWebContents();
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 finish_reason, FinishReason::ENUM_MAX); 169 finish_reason, FinishReason::ENUM_MAX);
170 } 170 }
171 finished_ = true; 171 finished_ = true;
172 } 172 }
173 // TODO(gab): Delete right away when getting rid of |finished_|. 173 // TODO(gab): Delete right away when getting rid of |finished_|.
174 if (IsFinishedCollectingMetrics()) 174 if (IsFinishedCollectingMetrics())
175 delegate_->ProfilerFinishedCollectingMetrics(); 175 delegate_->ProfilerFinishedCollectingMetrics();
176 } 176 }
177 177
178 #endif // !defined(OS_ANDROID) 178 #endif // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « chrome/browser/mac/mac_startup_profiler.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698