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

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

Issue 2206463002: Revert of Prevent duplicate content script injection defined in manifest.json (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/renderer/script_injector.h ('k') | extensions/renderer/user_script_injector.h » ('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 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 22 matching lines...) Expand all
33 // The number of CSS scripts injected. 33 // The number of CSS scripts injected.
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 // A list of extension urls of executing scripts.
44 std::set<GURL> injected_scripts;
45 43
46 // Log information about a given script run. If |send_script_activity| is 44 // Log information about a given script run. If |send_script_activity| is
47 // true, this also informs the browser of the script run. 45 // true, this also informs the browser of the script run.
48 void LogRun(bool send_script_activity); 46 void LogRun(bool send_script_activity);
49 47
50 private: 48 private:
51 // 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
52 // 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
53 // directly. 51 // directly.
54 int routing_id_; 52 int routing_id_;
55 53
56 // The run location at which injection is happening. 54 // The run location at which injection is happening.
57 UserScript::RunLocation run_location_; 55 UserScript::RunLocation run_location_;
58 56
59 // 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.
60 GURL frame_url_; 58 GURL frame_url_;
61 59
62 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo); 60 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo);
63 }; 61 };
64 62
65 } // namespace extensions 63 } // namespace extensions
66 64
67 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_ 65 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
OLDNEW
« no previous file with comments | « extensions/renderer/script_injector.h ('k') | extensions/renderer/user_script_injector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698