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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 28046: Use string for Histogram names since these are all ASCII anyway wide-characte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/renderer_host/render_widget_host_view_win.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/gfx/gdi_util.h" 8 #include "base/gfx/gdi_util.h"
9 #include "base/gfx/rect.h" 9 #include "base/gfx/rect.h"
10 #include "base/histogram.h" 10 #include "base/histogram.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 paint_dc.FillRect(&r, white_brush); 517 paint_dc.FillRect(&r, white_brush);
518 } 518 }
519 if (!whiteout_start_time_.is_null()) { 519 if (!whiteout_start_time_.is_null()) {
520 TimeDelta whiteout_duration = TimeTicks::Now() - whiteout_start_time_; 520 TimeDelta whiteout_duration = TimeTicks::Now() - whiteout_start_time_;
521 521
522 // If field trial is active, report results in special histogram. 522 // If field trial is active, report results in special histogram.
523 static scoped_refptr<FieldTrial> trial( 523 static scoped_refptr<FieldTrial> trial(
524 FieldTrialList::Find(BrowserTrial::kMemoryModelFieldTrial)); 524 FieldTrialList::Find(BrowserTrial::kMemoryModelFieldTrial));
525 if (trial.get()) { 525 if (trial.get()) {
526 if (trial->boolean_value()) 526 if (trial->boolean_value())
527 UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration_trial_high_memory", 527 UMA_HISTOGRAM_TIMES("MPArch.RWHH_WhiteoutDuration_trial_high_memory",
528 whiteout_duration); 528 whiteout_duration);
529 else 529 else
530 UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration_trial_med_memory", 530 UMA_HISTOGRAM_TIMES("MPArch.RWHH_WhiteoutDuration_trial_med_memory",
531 whiteout_duration); 531 whiteout_duration);
532 } else { 532 } else {
533 UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration", whiteout_duration); 533 UMA_HISTOGRAM_TIMES("MPArch.RWHH_WhiteoutDuration", whiteout_duration);
534 } 534 }
535 535
536 // Reset the start time to 0 so that we start recording again the next 536 // Reset the start time to 0 so that we start recording again the next
537 // time the backing store is NULL... 537 // time the backing store is NULL...
538 whiteout_start_time_ = TimeTicks(); 538 whiteout_start_time_ = TimeTicks();
539 } 539 }
540 } else { 540 } else {
541 paint_dc.FillRect(&paint_dc.m_ps.rcPaint, white_brush); 541 paint_dc.FillRect(&paint_dc.m_ps.rcPaint, white_brush);
542 if (whiteout_start_time_.is_null()) 542 if (whiteout_start_time_.is_null())
543 whiteout_start_time_ = TimeTicks::Now(); 543 whiteout_start_time_ = TimeTicks::Now();
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 // WM_LBUTTONDOWN. 1040 // WM_LBUTTONDOWN.
1041 SetFocus(); 1041 SetFocus();
1042 } 1042 }
1043 } 1043 }
1044 1044
1045 void RenderWidgetHostViewWin::ShutdownHost() { 1045 void RenderWidgetHostViewWin::ShutdownHost() {
1046 shutdown_factory_.RevokeAll(); 1046 shutdown_factory_.RevokeAll();
1047 render_widget_host_->Shutdown(); 1047 render_widget_host_->Shutdown();
1048 // Do not touch any members at this point, |this| has been deleted. 1048 // Do not touch any members at this point, |this| has been deleted.
1049 } 1049 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_mac.mm ('k') | chrome/browser/renderer_host/resource_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698