OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |