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

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

Issue 2757293004: Remove DCHECK when initializing the TabUsageRecorder. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | chrome/browser/metrics/tab_usage_recorder.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/metrics/chrome_browser_main_extra_parts_metrics.h" 5 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 kStartupMetricsGatheringDelay); 406 kStartupMetricsGatheringDelay);
407 #endif // defined(OS_WIN) 407 #endif // defined(OS_WIN)
408 408
409 display_count_ = display::Screen::GetScreen()->GetNumDisplays(); 409 display_count_ = display::Screen::GetScreen()->GetNumDisplays();
410 UMA_HISTOGRAM_COUNTS_100("Hardware.Display.Count.OnStartup", display_count_); 410 UMA_HISTOGRAM_COUNTS_100("Hardware.Display.Count.OnStartup", display_count_);
411 display::Screen::GetScreen()->AddObserver(this); 411 display::Screen::GetScreen()->AddObserver(this);
412 is_screen_observer_ = true; 412 is_screen_observer_ = true;
413 413
414 #if !defined(OS_ANDROID) 414 #if !defined(OS_ANDROID)
415 metrics::BeginFirstWebContentsProfiling(); 415 metrics::BeginFirstWebContentsProfiling();
416 metrics::TabUsageRecorder::Initialize(); 416 metrics::TabUsageRecorder::InitializeIfNeeded();
417 #endif // !defined(OS_ANDROID) 417 #endif // !defined(OS_ANDROID)
418 } 418 }
419 419
420 void ChromeBrowserMainExtraPartsMetrics::OnDisplayAdded( 420 void ChromeBrowserMainExtraPartsMetrics::OnDisplayAdded(
421 const display::Display& new_display) { 421 const display::Display& new_display) {
422 EmitDisplaysChangedMetric(); 422 EmitDisplaysChangedMetric();
423 } 423 }
424 424
425 void ChromeBrowserMainExtraPartsMetrics::OnDisplayRemoved( 425 void ChromeBrowserMainExtraPartsMetrics::OnDisplayRemoved(
426 const display::Display& old_display) { 426 const display::Display& old_display) {
(...skipping 12 matching lines...) Expand all
439 } 439 }
440 } 440 }
441 441
442 namespace chrome { 442 namespace chrome {
443 443
444 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { 444 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) {
445 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); 445 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics());
446 } 446 }
447 447
448 } // namespace chrome 448 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/tab_usage_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698