Disable the CheckPolicyIndicators test in debug config on Windows.
[chromium-blink-merge.git] / extensions / renderer / scripts_run_info.h
blobe577cc32cb3175e8c3058de7a2c13df06e144d7c
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
6 #define EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_
8 #include <map>
9 #include <set>
10 #include <string>
12 #include "base/basictypes.h"
13 #include "base/macros.h"
14 #include "base/timer/elapsed_timer.h"
15 #include "extensions/common/user_script.h"
17 namespace blink {
18 class WebFrame;
21 namespace extensions {
23 // A struct containing information about a script run.
24 struct ScriptsRunInfo {
25 // Map of extensions IDs to the executing script paths.
26 typedef std::map<std::string, std::set<std::string> > ExecutingScriptsMap;
28 ScriptsRunInfo();
29 ~ScriptsRunInfo();
31 // The number of CSS scripts injected.
32 size_t num_css;
33 // The number of JS scripts injected.
34 size_t num_js;
35 // A map of extension ids to executing script paths.
36 ExecutingScriptsMap executing_scripts;
37 // The elapsed time since the ScriptsRunInfo was constructed.
38 base::ElapsedTimer timer;
40 // Log information about a given script run.
41 void LogRun(blink::WebFrame* web_frame, UserScript::RunLocation location);
43 private:
44 DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo);
47 } // namespace extensions
49 #endif // EXTENSIONS_RENDERER_SCRIPTS_RUN_INFO_H_