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

Side by Side Diff: chrome/renderer/user_script_slave.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
« no previous file with comments | « chrome/common/ipc_channel_win.cc ('k') | chrome/views/focus_manager.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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer/user_script_slave.h" 5 #include "chrome/renderer/user_script_slave.h"
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/perftimer.h" 9 #include "base/perftimer.h"
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 inject.append(script_contents_[*script].as_string()); 105 inject.append(script_contents_[*script].as_string());
106 inject.append(kUserScriptTail); 106 inject.append(kUserScriptTail);
107 frame->ExecuteJavaScript(inject, 107 frame->ExecuteJavaScript(inject,
108 GURL((*script)->url().spec()), 108 GURL((*script)->url().spec()),
109 -user_script_start_line_); 109 -user_script_start_line_);
110 ++num_matched; 110 ++num_matched;
111 } 111 }
112 } 112 }
113 113
114 if (location == UserScript::DOCUMENT_START) { 114 if (location == UserScript::DOCUMENT_START) {
115 HISTOGRAM_COUNTS_100(L"UserScripts:DocStart:Count", num_matched); 115 HISTOGRAM_COUNTS_100("UserScripts:DocStart:Count", num_matched);
116 HISTOGRAM_TIMES(L"UserScripts:DocStart:Time", timer.Elapsed()); 116 HISTOGRAM_TIMES("UserScripts:DocStart:Time", timer.Elapsed());
117 } else { 117 } else {
118 HISTOGRAM_COUNTS_100(L"UserScripts:DocEnd:Count", num_matched); 118 HISTOGRAM_COUNTS_100("UserScripts:DocEnd:Count", num_matched);
119 HISTOGRAM_TIMES(L"UserScripts:DocEnd:Time", timer.Elapsed()); 119 HISTOGRAM_TIMES("UserScripts:DocEnd:Time", timer.Elapsed());
120 } 120 }
121 121
122 return true; 122 return true;
123 } 123 }
OLDNEW
« no previous file with comments | « chrome/common/ipc_channel_win.cc ('k') | chrome/views/focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698