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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

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_mac.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "chrome/browser/browser_trial.h" 9 #include "chrome/browser/browser_trial.h"
10 #include "chrome/browser/renderer_host/backing_store.h" 10 #include "chrome/browser/renderer_host/backing_store.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 if (!renderWidgetHostView_->whiteout_start_time().is_null()) { 305 if (!renderWidgetHostView_->whiteout_start_time().is_null()) {
306 base::TimeDelta whiteout_duration = base::TimeTicks::Now() - 306 base::TimeDelta whiteout_duration = base::TimeTicks::Now() -
307 renderWidgetHostView_->whiteout_start_time(); 307 renderWidgetHostView_->whiteout_start_time();
308 308
309 // If field trial is active, report results in special histogram. 309 // If field trial is active, report results in special histogram.
310 static scoped_refptr<FieldTrial> trial( 310 static scoped_refptr<FieldTrial> trial(
311 FieldTrialList::Find(BrowserTrial::kMemoryModelFieldTrial)); 311 FieldTrialList::Find(BrowserTrial::kMemoryModelFieldTrial));
312 if (trial.get()) { 312 if (trial.get()) {
313 if (trial->boolean_value()) 313 if (trial->boolean_value())
314 UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration_trial_high_memory", 314 UMA_HISTOGRAM_TIMES("MPArch.RWHH_WhiteoutDuration_trial_high_memory",
315 whiteout_duration); 315 whiteout_duration);
316 else 316 else
317 UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration_trial_med_memory", 317 UMA_HISTOGRAM_TIMES("MPArch.RWHH_WhiteoutDuration_trial_med_memory",
318 whiteout_duration); 318 whiteout_duration);
319 } else { 319 } else {
320 UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration", whiteout_duration); 320 UMA_HISTOGRAM_TIMES("MPArch.RWHH_WhiteoutDuration", whiteout_duration);
321 } 321 }
322 322
323 // Reset the start time to 0 so that we start recording again the next 323 // Reset the start time to 0 so that we start recording again the next
324 // time the backing store is NULL... 324 // time the backing store is NULL...
325 renderWidgetHostView_->whiteout_start_time() = base::TimeTicks(); 325 renderWidgetHostView_->whiteout_start_time() = base::TimeTicks();
326 } 326 }
327 } else { 327 } else {
328 [[NSColor whiteColor] set]; 328 [[NSColor whiteColor] set];
329 NSRectFill(dirtyRect); 329 NSRectFill(dirtyRect);
330 if (renderWidgetHostView_->whiteout_start_time().is_null()) 330 if (renderWidgetHostView_->whiteout_start_time().is_null())
(...skipping 15 matching lines...) Expand all
346 return YES; 346 return YES;
347 } 347 }
348 348
349 - (BOOL)resignFirstResponder { 349 - (BOOL)resignFirstResponder {
350 renderWidgetHostView_->render_widget_host()->Blur(); 350 renderWidgetHostView_->render_widget_host()->Blur();
351 351
352 return YES; 352 return YES;
353 } 353 }
354 354
355 @end 355 @end
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.cc ('k') | chrome/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698