OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/user_script_slave.h" | 5 #include "chrome/renderer/extensions/user_script_slave.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/shared_memory.h" |
11 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
12 #include "base/perftimer.h" | 13 #include "base/perftimer.h" |
13 #include "base/pickle.h" | 14 #include "base/pickle.h" |
14 #include "base/shared_memory.h" | |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "chrome/common/extensions/csp_handler.h" | 16 #include "chrome/common/extensions/csp_handler.h" |
17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
18 #include "chrome/common/extensions/extension_messages.h" | 18 #include "chrome/common/extensions/extension_messages.h" |
19 #include "chrome/common/extensions/extension_set.h" | 19 #include "chrome/common/extensions/extension_set.h" |
20 #include "chrome/common/extensions/permissions/permissions_data.h" | 20 #include "chrome/common/extensions/permissions/permissions_data.h" |
21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
22 #include "chrome/renderer/chrome_render_process_observer.h" | 22 #include "chrome/renderer/chrome_render_process_observer.h" |
23 #include "chrome/renderer/extensions/dom_activity_logger.h" | 23 #include "chrome/renderer/extensions/dom_activity_logger.h" |
24 #include "chrome/renderer/extensions/extension_groups.h" | 24 #include "chrome/renderer/extensions/extension_groups.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 } else if (location == UserScript::DOCUMENT_IDLE) { | 377 } else if (location == UserScript::DOCUMENT_IDLE) { |
378 UMA_HISTOGRAM_COUNTS_100("Extensions.InjectIdle_ScriptCount", num_scripts); | 378 UMA_HISTOGRAM_COUNTS_100("Extensions.InjectIdle_ScriptCount", num_scripts); |
379 if (num_scripts) | 379 if (num_scripts) |
380 UMA_HISTOGRAM_TIMES("Extensions.InjectIdle_Time", timer.Elapsed()); | 380 UMA_HISTOGRAM_TIMES("Extensions.InjectIdle_Time", timer.Elapsed()); |
381 } else { | 381 } else { |
382 NOTREACHED(); | 382 NOTREACHED(); |
383 } | 383 } |
384 } | 384 } |
385 | 385 |
386 } // namespace extensions | 386 } // namespace extensions |
OLD | NEW |