| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/user_script_slave.h" | 5 #include "chrome/renderer/user_script_slave.h" |
| 6 | 6 |
| 7 #include <map> |
| 8 |
| 7 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 11 #include "base/logging.h" |
| 10 #include "base/perftimer.h" | 12 #include "base/perftimer.h" |
| 11 #include "base/pickle.h" | 13 #include "base/pickle.h" |
| 12 #include "base/shared_memory.h" | 14 #include "base/shared_memory.h" |
| 13 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
| 14 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 15 #include "chrome/common/chrome_switches.h" | |
| 16 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
| 17 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 18 #include "chrome/renderer/extension_groups.h" | 19 #include "chrome/renderer/extension_groups.h" |
| 19 #include "chrome/renderer/extensions/extension_renderer_info.h" | 20 #include "chrome/renderer/extensions/extension_renderer_info.h" |
| 20 #include "chrome/renderer/render_thread.h" | 21 #include "chrome/renderer/render_thread.h" |
| 21 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
| 22 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 23 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| 23 #include "third_party/WebKit/WebKit/chromium/public/WebVector.h" | 24 #include "third_party/WebKit/WebKit/chromium/public/WebVector.h" |
| 24 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" | 25 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
| 25 | 26 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 if (num_scripts) | 282 if (num_scripts) |
| 282 UMA_HISTOGRAM_TIMES("Extensions.InjectEnd_Time", timer.Elapsed()); | 283 UMA_HISTOGRAM_TIMES("Extensions.InjectEnd_Time", timer.Elapsed()); |
| 283 } else if (location == UserScript::DOCUMENT_IDLE) { | 284 } else if (location == UserScript::DOCUMENT_IDLE) { |
| 284 UMA_HISTOGRAM_COUNTS_100("Extensions.InjectIdle_ScriptCount", num_scripts); | 285 UMA_HISTOGRAM_COUNTS_100("Extensions.InjectIdle_ScriptCount", num_scripts); |
| 285 if (num_scripts) | 286 if (num_scripts) |
| 286 UMA_HISTOGRAM_TIMES("Extensions.InjectIdle_Time", timer.Elapsed()); | 287 UMA_HISTOGRAM_TIMES("Extensions.InjectIdle_Time", timer.Elapsed()); |
| 287 } else { | 288 } else { |
| 288 NOTREACHED(); | 289 NOTREACHED(); |
| 289 } | 290 } |
| 290 } | 291 } |
| OLD | NEW |