diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 09:54:13 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 09:54:13 +0000 |
commit | 7c927b60bffa117129ba9214fcb6174d753351d9 (patch) | |
tree | 785de404571d36e57c8c9b916426805fc43ee476 /chrome | |
parent | af2ae52b8f5ec53e1ba1b4593368cd66f59c3a4d (diff) | |
download | chromium_src-7c927b60bffa117129ba9214fcb6174d753351d9.zip chromium_src-7c927b60bffa117129ba9214fcb6174d753351d9.tar.gz chromium_src-7c927b60bffa117129ba9214fcb6174d753351d9.tar.bz2 |
Further reduce the bad dependency of chrome/common on chrome/browser.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/656011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
35 files changed, 111 insertions, 79 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 88ee96f..a4126d1 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -27,6 +27,7 @@ #include "chrome/browser/dom_ui/chrome_url_data_manager.h" #include "chrome/browser/google_service_auth_error.h" #include "chrome/browser/memory_details.h" +#include "chrome/browser/metrics/histogram_synchronizer.h" #include "chrome/browser/net/dns_global.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" @@ -35,7 +36,6 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/common/chrome_paths.h" -#include "chrome/common/histogram_synchronizer.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/platform_util.h" #include "chrome/common/pref_names.h" diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index e462d1d..63a3e86 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -36,6 +36,7 @@ #include "chrome/browser/extensions/extension_protocols.h" #include "chrome/browser/first_run.h" #include "chrome/browser/jankometer.h" +#include "chrome/browser/metrics/histogram_synchronizer.h" #include "chrome/browser/metrics/metrics_service.h" #include "chrome/browser/net/dns_global.h" #include "chrome/browser/net/metadata_url_request.h" @@ -52,7 +53,6 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/histogram_synchronizer.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/main_function_params.h" #include "chrome/common/net/net_resource_provider.h" diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc index e9874cd..fa466f3 100644 --- a/chrome/browser/extensions/crx_installer.cc +++ b/chrome/browser/extensions/crx_installer.cc @@ -13,11 +13,11 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/extensions/convert_user_script.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/profile.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/common/extensions/extension_error_reporter.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_type.h" #include "grit/browser_resources.h" diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc index 3d1fc64..7c9ec15 100644 --- a/chrome/browser/extensions/extension_creator.cc +++ b/chrome/browser/extensions/extension_creator.cc @@ -13,9 +13,9 @@ #include "base/scoped_handle.h" #include "base/scoped_temp_dir.h" #include "base/string_util.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/zip.h" namespace { diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc index dd12915..20acb53 100644 --- a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc +++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc @@ -6,12 +6,12 @@ #include "app/l10n_util.h" #include "chrome/browser/chrome_thread.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/extensions/extension_install_ui.h" #include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/browser_list.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_resource.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_service.h" diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc index 2141622..21dcd12 100644 --- a/chrome/browser/extensions/extension_protocols.cc +++ b/chrome/browser/extensions/extension_protocols.cc @@ -5,9 +5,9 @@ #include "chrome/browser/extensions/extension_protocols.h" #include "base/string_util.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_resource.h" #include "chrome/common/url_constants.h" #include "googleurl/src/url_util.h" diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 7b98410..d171767 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -18,7 +18,6 @@ #include "chrome/browser/extensions/extension_bookmarks_module.h" #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_dom_ui.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/extensions/extension_history_api.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_process_manager.h" @@ -33,6 +32,7 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_error_reporter.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_l10n_util.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_type.h" diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index 9d004e3..a9d6966 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -14,14 +14,14 @@ #include "base/scoped_handle.h" #include "base/task.h" #include "chrome/browser/chrome_thread.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/common/extensions/extension_unpacker.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_l10n_util.h" +#include "chrome/common/extensions/extension_unpacker.h" #include "chrome/common/json_value_serializer.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc index 546c734..79abdcf 100644 --- a/chrome/browser/extensions/user_script_listener_unittest.cc +++ b/chrome/browser/extensions/user_script_listener_unittest.cc @@ -4,7 +4,6 @@ #include "base/message_loop.h" #include "base/thread.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/extensions/extensions_service_unittest.h" #include "chrome/browser/extensions/user_script_listener.h" #include "chrome/browser/renderer_host/global_request_id.h" @@ -12,6 +11,7 @@ #include "chrome/browser/renderer_host/resource_handler.h" #include "chrome/browser/renderer_host/resource_queue.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_type.h" #include "net/url_request/url_request.h" diff --git a/chrome/common/histogram_synchronizer.cc b/chrome/browser/metrics/histogram_synchronizer.cc index 9aeff5e..ff46199 100644 --- a/chrome/common/histogram_synchronizer.cc +++ b/chrome/browser/metrics/histogram_synchronizer.cc @@ -2,13 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/common/histogram_synchronizer.h" +#include "chrome/browser/metrics/histogram_synchronizer.h" #include "base/histogram.h" #include "base/logging.h" #include "base/thread.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/renderer_host/render_process_host.h" +#include "chrome/common/chrome_constants.h" #include "chrome/common/render_messages.h" using base::Time; @@ -240,9 +241,13 @@ int HistogramSynchronizer::GetNextAvaibleSequenceNumber( RendererHistogramRequester requester) { AutoLock auto_lock(lock_); ++next_available_sequence_number_; - if (0 > next_available_sequence_number_) // We wrapped around. - next_available_sequence_number_ = kReservedSequenceNumber + 1; - DCHECK(next_available_sequence_number_ != kReservedSequenceNumber); + if (0 > next_available_sequence_number_) { + // We wrapped around. + next_available_sequence_number_ = + chrome::kHistogramSynchronizerReservedSequenceNumber + 1; + } + DCHECK_NE(next_available_sequence_number_, + chrome::kHistogramSynchronizerReservedSequenceNumber); if (requester == ASYNC_HISTOGRAMS) { async_sequence_number_ = next_available_sequence_number_; async_renderers_pending_ = 0; diff --git a/chrome/common/histogram_synchronizer.h b/chrome/browser/metrics/histogram_synchronizer.h index 1190555..1a69afb 100644 --- a/chrome/common/histogram_synchronizer.h +++ b/chrome/browser/metrics/histogram_synchronizer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_COMMON_HISTOGRAM_SYNCHRONIZER_H_ -#define CHROME_COMMON_HISTOGRAM_SYNCHRONIZER_H_ +#ifndef CHROME_BROWSER_METRICS_HISTOGRAM_SYNCHRONIZER_H_ +#define CHROME_BROWSER_METRICS_HISTOGRAM_SYNCHRONIZER_H_ #include <string> #include <vector> @@ -26,8 +26,6 @@ class HistogramSynchronizer : public SYNCHRONOUS_HISTOGRAMS }; - static const int kReservedSequenceNumber = 0; - HistogramSynchronizer(); ~HistogramSynchronizer(); @@ -144,4 +142,4 @@ class HistogramSynchronizer : public DISALLOW_COPY_AND_ASSIGN(HistogramSynchronizer); }; -#endif // CHROME_COMMON_HISTOGRAM_SYNCHRONIZER_H_ +#endif // CHROME_BROWSER_METRICS_HISTOGRAM_SYNCHRONIZER_H_ diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index dbd48fa..6b4ebbb 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -174,13 +174,13 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/load_notification_details.h" #include "chrome/browser/memory_details.h" +#include "chrome/browser/metrics/histogram_synchronizer.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/common/child_process_logging.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/histogram_synchronizer.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/render_messages.h" diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc index d58bed5..a7d36af 100644 --- a/chrome/browser/renderer_host/buffered_resource_handler.cc +++ b/chrome/browser/renderer_host/buffered_resource_handler.cc @@ -15,6 +15,7 @@ #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "chrome/browser/renderer_host/x509_user_cert_resource_handler.h" #include "chrome/common/extensions/user_script.h" +#include "chrome/common/resource_response.h" #include "chrome/common/url_constants.h" #include "net/base/io_buffer.h" #include "net/base/mime_sniffer.h" diff --git a/chrome/browser/renderer_host/cross_site_resource_handler.h b/chrome/browser/renderer_host/cross_site_resource_handler.h index fc6bef2..ddb289f 100644 --- a/chrome/browser/renderer_host/cross_site_resource_handler.h +++ b/chrome/browser/renderer_host/cross_site_resource_handler.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_RENDERER_HOST_CROSS_SITE_RESOURCE_HANDLER_H_ #include "chrome/browser/renderer_host/resource_handler.h" +#include "net/url_request/url_request_status.h" class ResourceDispatcherHost; struct GlobalRequestID; diff --git a/chrome/browser/renderer_host/download_resource_handler.cc b/chrome/browser/renderer_host/download_resource_handler.cc index 1bbb757..e0aa870 100644 --- a/chrome/browser/renderer_host/download_resource_handler.cc +++ b/chrome/browser/renderer_host/download_resource_handler.cc @@ -10,6 +10,7 @@ #include "chrome/browser/download/download_manager.h" #include "chrome/browser/renderer_host/global_request_id.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" +#include "chrome/common/resource_response.h" #include "net/base/io_buffer.h" #include "net/url_request/url_request_context.h" diff --git a/chrome/browser/renderer_host/download_throttling_resource_handler.cc b/chrome/browser/renderer_host/download_throttling_resource_handler.cc index 87314dc..4609a4c 100644 --- a/chrome/browser/renderer_host/download_throttling_resource_handler.cc +++ b/chrome/browser/renderer_host/download_throttling_resource_handler.cc @@ -7,6 +7,7 @@ #include "base/logging.h" #include "chrome/browser/renderer_host/download_resource_handler.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" +#include "chrome/common/resource_response.h" #include "net/base/io_buffer.h" DownloadThrottlingResourceHandler::DownloadThrottlingResourceHandler( diff --git a/chrome/browser/renderer_host/resource_handler.h b/chrome/browser/renderer_host/resource_handler.h index 59f89c7..526c6a2 100644 --- a/chrome/browser/renderer_host/resource_handler.h +++ b/chrome/browser/renderer_host/resource_handler.h @@ -15,45 +15,14 @@ #include <string> #include "chrome/browser/chrome_thread.h" -#include "chrome/common/filter_policy.h" -#include "net/url_request/url_request_status.h" -#include "webkit/glue/resource_loader_bridge.h" namespace net { class IOBuffer; } -// Parameters for a resource response header. -struct ResourceResponseHead - : webkit_glue::ResourceLoaderBridge::ResponseInfo { - ResourceResponseHead() : filter_policy(FilterPolicy::DONT_FILTER) {} - - // The response status. - URLRequestStatus status; - - // Specifies if the resource should be filtered before being displayed - // (insecure resources can be filtered to keep the page secure). - FilterPolicy::Type filter_policy; -}; - -// Parameters for a synchronous resource response. -struct SyncLoadResult : ResourceResponseHead { - // The final URL after any redirects. - GURL final_url; - - // The response data. - std::string data; -}; - -// Simple wrapper that refcounts ResourceResponseHead. -struct ResourceResponse : public base::RefCounted<ResourceResponse> { - ResourceResponseHead response_head; - - private: - friend class base::RefCounted<ResourceResponse>; - - ~ResourceResponse() {} -}; +struct ResourceResponse; +class GURL; +class URLRequestStatus; // The resource dispatcher host uses this interface to push load events to the // renderer, allowing for differences in the types of IPC messages generated. diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 9e9833c..2460db3 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -17,12 +17,12 @@ #include "chrome/browser/chrome_plugin_browsing_context.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/download/download_file.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/geolocation/geolocation_permission_context.h" #include "chrome/browser/geolocation/geolocation_dispatcher_host.h" #include "chrome/browser/host_zoom_map.h" #include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h" +#include "chrome/browser/metrics/histogram_synchronizer.h" #include "chrome/browser/nacl_host/nacl_process_host.h" #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/net/dns_global.h" @@ -49,8 +49,8 @@ #include "chrome/common/chrome_plugin_util.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension_constants.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_message_bundle.h" -#include "chrome/common/histogram_synchronizer.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/render_messages.h" diff --git a/chrome/browser/renderer_host/save_file_resource_handler.cc b/chrome/browser/renderer_host/save_file_resource_handler.cc index b6584f0..c6f8de2 100644 --- a/chrome/browser/renderer_host/save_file_resource_handler.cc +++ b/chrome/browser/renderer_host/save_file_resource_handler.cc @@ -10,6 +10,7 @@ #include "chrome/browser/chrome_thread.h" #include "chrome/browser/download/save_file_manager.h" #include "net/base/io_buffer.h" +#include "net/url_request/url_request_status.h" SaveFileResourceHandler::SaveFileResourceHandler(int render_process_host_id, int render_view_id, diff --git a/chrome/browser/renderer_host/save_file_resource_handler.h b/chrome/browser/renderer_host/save_file_resource_handler.h index 07eca4d..825ad91 100644 --- a/chrome/browser/renderer_host/save_file_resource_handler.h +++ b/chrome/browser/renderer_host/save_file_resource_handler.h @@ -8,6 +8,7 @@ #include <string> #include "chrome/browser/renderer_host/resource_handler.h" +#include "googleurl/src/gurl.h" class SaveFileManager; diff --git a/chrome/browser/renderer_host/sync_resource_handler.h b/chrome/browser/renderer_host/sync_resource_handler.h index cb2ae22..d15fe0d 100644 --- a/chrome/browser/renderer_host/sync_resource_handler.h +++ b/chrome/browser/renderer_host/sync_resource_handler.h @@ -9,6 +9,7 @@ #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/browser/renderer_host/resource_handler.h" +#include "chrome/common/resource_response.h" #include "net/base/io_buffer.h" // Used to complete a synchronous resource request in response to resource load diff --git a/chrome/browser/renderer_host/x509_user_cert_resource_handler.cc b/chrome/browser/renderer_host/x509_user_cert_resource_handler.cc index 76dcedd..abf5541 100644 --- a/chrome/browser/renderer_host/x509_user_cert_resource_handler.cc +++ b/chrome/browser/renderer_host/x509_user_cert_resource_handler.cc @@ -10,6 +10,7 @@ #include "chrome/browser/download/download_file.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" +#include "chrome/common/resource_response.h" #include "chrome/common/url_constants.h" #include "net/base/cert_database.h" #include "net/base/io_buffer.h" diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 61bb1eb..f0e0038 100755 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -848,8 +848,6 @@ 'browser/extensions/execute_code_in_tab_function.h', 'browser/extensions/extension_browser_event_router.cc', 'browser/extensions/extension_browser_event_router.h', - 'browser/extensions/extension_file_util.cc', - 'browser/extensions/extension_file_util.h', 'browser/extensions/extension_function.cc', 'browser/extensions/extension_function.h', 'browser/extensions/extension_function_dispatcher.cc', @@ -961,7 +959,7 @@ 'browser/geolocation/geolocation_permission_context.cc', 'browser/geolocation/geolocation_permission_context.h', 'browser/geolocation/geolocation_prefs.cc', - 'browser/geolocation/geolocation_prefs.h', + 'browser/geolocation/geolocation_prefs.h', 'browser/geolocation/location_arbitrator.cc', 'browser/geolocation/location_arbitrator.h', 'browser/geolocation/location_provider.cc', @@ -1365,6 +1363,8 @@ 'browser/message_box_handler.h', 'browser/meta_table_helper.cc', 'browser/meta_table_helper.h', + 'browser/metrics/histogram_synchronizer.cc', + 'browser/metrics/histogram_synchronizer.h', 'browser/metrics/metric_event_duration_details.h', 'browser/metrics/metrics_log.cc', 'browser/metrics/metrics_log.h', diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index 9f07af8..b2f0bd6 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -45,7 +45,7 @@ 'common/devtools_messages.h', 'common/devtools_messages_internal.h', 'common/geoposition.cc', - 'common/geoposition.h', + 'common/geoposition.h', 'common/gpu_messages.h', 'common/gpu_messages_internal.h', 'common/io_surface_support_mac.cc', @@ -75,6 +75,7 @@ 'common/property_bag.cc', 'common/property_bag.h', 'common/ref_counted_util.h', + 'common/resource_response.h', 'common/result_codes.h', 'common/sandbox_init_wrapper.h', 'common/sandbox_init_wrapper_linux.cc', @@ -143,14 +144,16 @@ 'common/desktop_notifications/active_notification_tracker.cc', 'common/extensions/extension.cc', 'common/extensions/extension.h', + 'common/extensions/extension_action.cc', + 'common/extensions/extension_action.h', 'common/extensions/extension_constants.cc', 'common/extensions/extension_constants.h', 'common/extensions/extension_error_reporter.cc', 'common/extensions/extension_error_reporter.h', 'common/extensions/extension_error_utils.cc', 'common/extensions/extension_error_utils.h', - 'common/extensions/extension_action.cc', - 'common/extensions/extension_action.h', + 'common/extensions/extension_file_util.cc', + 'common/extensions/extension_file_util.h', 'common/extensions/extension_l10n_util.cc', 'common/extensions/extension_l10n_util.h', 'common/extensions/extension_message_bundle.cc', @@ -211,8 +214,6 @@ 'common/gtk_tree.h', 'common/gtk_util.cc', 'common/gtk_util.h', - 'common/histogram_synchronizer.cc', - 'common/histogram_synchronizer.h', 'common/jstemplate_builder.cc', 'common/jstemplate_builder.h', 'common/libxml_utils.cc', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 860ff88..3ec7ce8 100755 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -706,7 +706,6 @@ 'browser/download/save_package_unittest.cc', 'browser/encoding_menu_controller_unittest.cc', 'browser/extensions/convert_user_script_unittest.cc', - 'browser/extensions/extension_file_util_unittest.cc', 'browser/extensions/extension_messages_unittest.cc', 'browser/extensions/extension_process_manager_unittest.cc', 'browser/extensions/extension_ui_unittest.cc', @@ -865,12 +864,13 @@ 'common/bzip2_unittest.cc', 'common/child_process_logging_mac_unittest.mm', 'common/common_param_traits_unittest.cc', - 'common/extensions/extension_resource_unittest.cc', - 'common/extensions/extension_unittest.cc', 'common/extensions/extension_action_unittest.cc', + 'common/extensions/extension_file_util_unittest.cc', 'common/extensions/extension_l10n_util_unittest.cc', 'common/extensions/extension_message_bundle_unittest.cc', 'common/extensions/extension_message_filter_peer_unittest.cc', + 'common/extensions/extension_resource_unittest.cc', + 'common/extensions/extension_unittest.cc', 'common/extensions/extension_unpacker_unittest.cc', 'common/extensions/update_manifest_unittest.cc', 'common/extensions/url_pattern_unittest.cc', diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index 8226cd8..ed5947a 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -129,6 +129,8 @@ const bool kRecordModeEnabled = true; const bool kRecordModeEnabled = false; #endif +const int kHistogramSynchronizerReservedSequenceNumber = 0; + } // namespace chrome #undef FPL diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h index fc271e0..cd85a14 100644 --- a/chrome/common/chrome_constants.h +++ b/chrome/common/chrome_constants.h @@ -77,6 +77,8 @@ extern const size_t kMaxURLChars; extern const bool kRecordModeEnabled; +extern const int kHistogramSynchronizerReservedSequenceNumber; + } // namespace chrome #endif // CHROME_COMMON_CHROME_CONSTANTS_H_ diff --git a/chrome/browser/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc index 346bfab..0192b67 100644 --- a/chrome/browser/extensions/extension_file_util.cc +++ b/chrome/common/extensions/extension_file_util.cc @@ -2,15 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extension_file_util.h" +#include "chrome/common/extensions/extension_file_util.h" #include "app/l10n_util.h" #include "base/file_util.h" #include "base/logging.h" #include "base/scoped_temp_dir.h" #include "base/string_util.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/extensions/extension_prefs.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_l10n_util.h" #include "chrome/common/extensions/extension_constants.h" diff --git a/chrome/browser/extensions/extension_file_util.h b/chrome/common/extensions/extension_file_util.h index d8bb448..b711df0 100644 --- a/chrome/browser/extensions/extension_file_util.h +++ b/chrome/common/extensions/extension_file_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ -#define CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ +#ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ +#define CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ #include <set> #include <string> @@ -105,4 +105,4 @@ FilePath ExtensionURLToRelativeFilePath(const GURL& url); } // extension_file_util -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_UTIL_H_ +#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ diff --git a/chrome/browser/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc index 31ed023..9856e42 100644 --- a/chrome/browser/extensions/extension_file_util_unittest.cc +++ b/chrome/common/extensions/extension_file_util_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extension_file_util.h" +#include "chrome/common/extensions/extension_file_util.h" #include "base/file_util.h" #include "base/scoped_temp_dir.h" diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc index 2fd3f92..3f329fb 100644 --- a/chrome/common/extensions/extension_l10n_util.cc +++ b/chrome/common/extensions/extension_l10n_util.cc @@ -14,10 +14,10 @@ #include "base/string_util.h" #include "base/values.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_message_bundle.h" #include "chrome/common/json_value_serializer.h" #include "chrome/common/url_constants.h" diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc index 425105f..ac643df 100644 --- a/chrome/common/extensions/extension_unpacker.cc +++ b/chrome/common/extensions/extension_unpacker.cc @@ -11,10 +11,10 @@ #include "base/thread.h" #include "base/values.h" #include "net/base/file_stream.h" -#include "chrome/browser/extensions/extension_file_util.h" #include "chrome/common/common_param_traits.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" +#include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/json_value_serializer.h" #include "chrome/common/notification_service.h" #include "chrome/common/url_constants.h" diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 7e05039..42b0313 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -16,7 +16,6 @@ #include "base/ref_counted.h" #include "base/shared_memory.h" #include "base/string16.h" -#include "chrome/browser/renderer_host/resource_handler.h" #include "chrome/common/common_param_traits.h" #include "chrome/common/css_colors.h" #include "chrome/common/dom_storage_common.h" @@ -26,6 +25,7 @@ #include "chrome/common/navigation_gesture.h" #include "chrome/common/page_transition_types.h" #include "chrome/common/renderer_preferences.h" +#include "chrome/common/resource_response.h" #include "chrome/common/transport_dib.h" #include "chrome/common/view_types.h" #include "chrome/common/webkit_param_traits.h" diff --git a/chrome/common/resource_response.h b/chrome/common/resource_response.h new file mode 100644 index 0000000..840b864 --- /dev/null +++ b/chrome/common/resource_response.h @@ -0,0 +1,50 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading + +#ifndef CHROME_COMMON_RESOURCE_RESPONSE_H_ +#define CHROME_COMMON_RESOURCE_RESPONSE_H_ + +#include <string> + +#include "base/ref_counted.h" +#include "chrome/common/filter_policy.h" +#include "googleurl/src/gurl.h" +#include "net/url_request/url_request_status.h" +#include "webkit/glue/resource_loader_bridge.h" + +// Parameters for a resource response header. +struct ResourceResponseHead + : webkit_glue::ResourceLoaderBridge::ResponseInfo { + ResourceResponseHead() : filter_policy(FilterPolicy::DONT_FILTER) {} + + // The response status. + URLRequestStatus status; + + // Specifies if the resource should be filtered before being displayed + // (insecure resources can be filtered to keep the page secure). + FilterPolicy::Type filter_policy; +}; + +// Parameters for a synchronous resource response. +struct SyncLoadResult : ResourceResponseHead { + // The final URL after any redirects. + GURL final_url; + + // The response data. + std::string data; +}; + +// Simple wrapper that refcounts ResourceResponseHead. +struct ResourceResponse : public base::RefCounted<ResourceResponse> { + ResourceResponseHead response_head; + + private: + friend class base::RefCounted<ResourceResponse>; + + ~ResourceResponse() {} +}; + +#endif // CHROME_COMMON_RESOURCE_RESPONSE_H_ diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index c58b10b..74acd9c 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -29,7 +29,6 @@ #include "chrome/common/child_process_logging.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_constants.h" -#include "chrome/common/histogram_synchronizer.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/page_zoom.h" @@ -4261,7 +4260,7 @@ void RenderView::DumpLoadHistograms() const { // the next load. if (RenderThread::current()) { RenderThread::current()->SendHistograms( - HistogramSynchronizer::kReservedSequenceNumber); + chrome::kHistogramSynchronizerReservedSequenceNumber); } } |