| 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/render_thread.h" | 5 #include "chrome/renderer/render_thread.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/nullable_string16.h" | 15 #include "base/nullable_string16.h" |
| 16 #include "base/process_util.h" | 16 #include "base/process_util.h" |
| 17 #include "base/shared_memory.h" | 17 #include "base/shared_memory.h" |
| 18 #include "base/stats_table.h" | 18 #include "base/stats_table.h" |
| 19 #include "base/string_util.h" | 19 #include "base/string_util.h" |
| 20 #include "base/task.h" |
| 20 #include "base/thread_local.h" | 21 #include "base/thread_local.h" |
| 21 #include "chrome/common/appcache/appcache_dispatcher.h" | 22 #include "chrome/common/appcache/appcache_dispatcher.h" |
| 22 #include "chrome/common/child_process_logging.h" | 23 #include "chrome/common/child_process_logging.h" |
| 23 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/common/db_message_filter.h" | 25 #include "chrome/common/db_message_filter.h" |
| 25 #include "chrome/common/dom_storage_common.h" | 26 #include "chrome/common/dom_storage_common.h" |
| 26 #include "chrome/common/extensions/extension_extent.h" | 27 #include "chrome/common/extensions/extension_extent.h" |
| 27 #include "chrome/common/plugin_messages.h" | 28 #include "chrome/common/plugin_messages.h" |
| 28 #include "chrome/common/render_messages.h" | 29 #include "chrome/common/render_messages.h" |
| 29 #include "chrome/common/renderer_preferences.h" | 30 #include "chrome/common/renderer_preferences.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 52 #include "chrome/renderer/net/renderer_net_predictor.h" | 53 #include "chrome/renderer/net/renderer_net_predictor.h" |
| 53 #include "chrome/renderer/plugin_channel_host.h" | 54 #include "chrome/renderer/plugin_channel_host.h" |
| 54 #include "chrome/renderer/render_process_impl.h" | 55 #include "chrome/renderer/render_process_impl.h" |
| 55 #include "chrome/renderer/render_view.h" | 56 #include "chrome/renderer/render_view.h" |
| 56 #include "chrome/renderer/render_view_visitor.h" | 57 #include "chrome/renderer/render_view_visitor.h" |
| 57 #include "chrome/renderer/renderer_histogram_snapshots.h" | 58 #include "chrome/renderer/renderer_histogram_snapshots.h" |
| 58 #include "chrome/renderer/renderer_webindexeddatabase_impl.h" | 59 #include "chrome/renderer/renderer_webindexeddatabase_impl.h" |
| 59 #include "chrome/renderer/renderer_webkitclient_impl.h" | 60 #include "chrome/renderer/renderer_webkitclient_impl.h" |
| 60 #include "chrome/renderer/spellchecker/spellcheck.h" | 61 #include "chrome/renderer/spellchecker/spellcheck.h" |
| 61 #include "chrome/renderer/user_script_slave.h" | 62 #include "chrome/renderer/user_script_slave.h" |
| 63 #include "ipc/ipc_channel_handle.h" |
| 62 #include "ipc/ipc_message.h" | 64 #include "ipc/ipc_message.h" |
| 63 #include "ipc/ipc_platform_file.h" | 65 #include "ipc/ipc_platform_file.h" |
| 64 #include "net/base/net_util.h" | 66 #include "net/base/net_util.h" |
| 65 #include "third_party/sqlite/preprocessed/sqlite3.h" | 67 #include "third_party/sqlite/preprocessed/sqlite3.h" |
| 66 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" | 68 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" |
| 67 #include "third_party/WebKit/WebKit/chromium/public/WebCache.h" | 69 #include "third_party/WebKit/WebKit/chromium/public/WebCache.h" |
| 68 #include "third_party/WebKit/WebKit/chromium/public/WebColor.h" | 70 #include "third_party/WebKit/WebKit/chromium/public/WebColor.h" |
| 69 #include "third_party/WebKit/WebKit/chromium/public/WebCrossOriginPreflightResul
tCache.h" | 71 #include "third_party/WebKit/WebKit/chromium/public/WebCrossOriginPreflightResul
tCache.h" |
| 70 #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" | 72 #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" |
| 71 #include "third_party/WebKit/WebKit/chromium/public/WebFontCache.h" | 73 #include "third_party/WebKit/WebKit/chromium/public/WebFontCache.h" |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 } | 1060 } |
| 1059 | 1061 |
| 1060 std::string RenderThread::GetExtensionIdByBrowseExtent(const GURL& url) { | 1062 std::string RenderThread::GetExtensionIdByBrowseExtent(const GURL& url) { |
| 1061 for (size_t i = 0; i < extension_extents_.size(); ++i) { | 1063 for (size_t i = 0; i < extension_extents_.size(); ++i) { |
| 1062 if (extension_extents_[i].browse_extent.ContainsURL(url)) | 1064 if (extension_extents_[i].browse_extent.ContainsURL(url)) |
| 1063 return extension_extents_[i].extension_id; | 1065 return extension_extents_[i].extension_id; |
| 1064 } | 1066 } |
| 1065 | 1067 |
| 1066 return std::string(); | 1068 return std::string(); |
| 1067 } | 1069 } |
| OLD | NEW |