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

Side by Side Diff: extensions/renderer/scripts_run_info.cc

Issue 493633003: Browser changes for wiring up RequestContentScript API to shared memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit: Inline methods in unit tests Created 6 years, 3 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 | « extensions/common/user_script.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/scripts_run_info.h" 5 #include "extensions/renderer/scripts_run_info.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "content/public/renderer/render_view.h" 8 #include "content/public/renderer/render_view.h"
9 #include "extensions/common/extension_messages.h" 9 #include "extensions/common/extension_messages.h"
10 #include "extensions/renderer/script_context.h" 10 #include "extensions/renderer/script_context.h"
(...skipping 30 matching lines...) Expand all
41 UMA_HISTOGRAM_COUNTS_100("Extensions.InjectEnd_ScriptCount", num_js); 41 UMA_HISTOGRAM_COUNTS_100("Extensions.InjectEnd_ScriptCount", num_js);
42 if (num_js) 42 if (num_js)
43 UMA_HISTOGRAM_TIMES("Extensions.InjectEnd_Time", timer.Elapsed()); 43 UMA_HISTOGRAM_TIMES("Extensions.InjectEnd_Time", timer.Elapsed());
44 break; 44 break;
45 case UserScript::DOCUMENT_IDLE: 45 case UserScript::DOCUMENT_IDLE:
46 UMA_HISTOGRAM_COUNTS_100("Extensions.InjectIdle_ScriptCount", num_js); 46 UMA_HISTOGRAM_COUNTS_100("Extensions.InjectIdle_ScriptCount", num_js);
47 if (num_js) 47 if (num_js)
48 UMA_HISTOGRAM_TIMES("Extensions.InjectIdle_Time", timer.Elapsed()); 48 UMA_HISTOGRAM_TIMES("Extensions.InjectIdle_Time", timer.Elapsed());
49 break; 49 break;
50 case UserScript::RUN_DEFERRED: 50 case UserScript::RUN_DEFERRED:
51 case UserScript::BROWSER_DRIVEN:
51 // TODO(rdevlin.cronin): Add histograms. 52 // TODO(rdevlin.cronin): Add histograms.
52 break; 53 break;
53 case UserScript::UNDEFINED: 54 case UserScript::UNDEFINED:
54 case UserScript::RUN_LOCATION_LAST: 55 case UserScript::RUN_LOCATION_LAST:
55 NOTREACHED(); 56 NOTREACHED();
56 } 57 }
57 } 58 }
58 59
59 } // namespace extensions 60 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/user_script.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698