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

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

Issue 2089333002: [Extensions] Add renderer-side logic to short circuit activity logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Guard adding dom activity loggers Created 4 years, 5 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
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 #ifndef EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ 5 #ifndef EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
6 #define EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ 6 #define EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 23 matching lines...) Expand all
34 size_t num_css; 34 size_t num_css;
35 // The number of JS scripts injected. 35 // The number of JS scripts injected.
36 size_t num_js; 36 size_t num_js;
37 // The number of blocked JS scripts injected. 37 // The number of blocked JS scripts injected.
38 size_t num_blocking_js; 38 size_t num_blocking_js;
39 // A map of extension ids to executing script paths. 39 // A map of extension ids to executing script paths.
40 ExecutingScriptsMap executing_scripts; 40 ExecutingScriptsMap executing_scripts;
41 // The elapsed time since the ScriptsRunInfo was constructed. 41 // The elapsed time since the ScriptsRunInfo was constructed.
42 base::ElapsedTimer timer; 42 base::ElapsedTimer timer;
43 43
44 // Log information about a given script run. 44 // Log information about a given script run. If |send_script_activity| is
45 void LogRun(); 45 // true, this also informs the browser of the script run.
46 void LogRun(bool send_script_activity);
46 47
47 private: 48 private:
48 // The routinig id to use to notify the browser of any injections. Since the 49 // The routinig id to use to notify the browser of any injections. Since the
49 // frame may be deleted in injection, we don't hold on to a reference to it 50 // frame may be deleted in injection, we don't hold on to a reference to it
50 // directly. 51 // directly.
51 int routing_id_; 52 int routing_id_;
52 53
53 // The run location at which injection is happening. 54 // The run location at which injection is happening.
54 UserScript::RunLocation run_location_; 55 UserScript::RunLocation run_location_;
55 56
56 // The url of the frame, preserved for the same reason as the routing id. 57 // The url of the frame, preserved for the same reason as the routing id.
57 GURL frame_url_; 58 GURL frame_url_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo); 60 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo);
60 }; 61 };
61 62
62 } // namespace extensions 63 } // namespace extensions
63 64
64 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ 65 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
OLDNEW
« no previous file with comments | « extensions/renderer/script_injection_manager.cc ('k') | extensions/renderer/scripts_run_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698