Skip to content

Commit

Permalink
Revert of Mustash: Move GURL ParamTraits to url/ipc (patchset chromiu…
Browse files Browse the repository at this point in the history
…m#18 id:330001 of https://codereview.chromium.org/1722773002/ )

Reason for revert:
Broke compile on iOS_Simulator_GN_(dbg): https://build.chromium.org/p/chromium.mac/builders/iOS_Simulator_GN_%28dbg%29/builds/1777

Original issue's description:
> Move GURL ParamTraits to url/ipc
>
> As a part of the GPU refactor for Mus, we are trying to eliminate spots where content/common/gpu depends on
> content/. One such dependency is GURL. As per discussion here:
> https://codereview.chromium.org/1703163002/, the plan of record is to move
> GURL ParamTraits out of content/ and into url/.
>
> BUG=586368
> CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
>
> Committed: https://crrev.com/45eb2e749a8b08988ab45bfd6806c004e9f511fa
> Cr-Commit-Position: refs/heads/master@{#378859}

TBR=fsamuel@chromium.org,piman@chromium.org,brettw@chromium.org,tsepez@chromium.org,thakis@chromium.org,markdittmer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=586368

Review URL: https://codereview.chromium.org/1755363003

Cr-Commit-Position: refs/heads/master@{#378869}
  • Loading branch information
dimich authored and Commit bot committed Mar 2, 2016
1 parent 53eccbc commit 08ebff8
Show file tree
Hide file tree
Showing 66 changed files with 153 additions and 351 deletions.
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ group("both_gn_and_gyp") {
"//ui/events:events_unittests",
"//ui/gl:gl_unittests",
"//ui/touch_selection:ui_touch_selection_unittests",
"//url/ipc:url_ipc",
]
} else {
deps += [
Expand Down
1 change: 0 additions & 1 deletion android_webview/android_webview.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@
'../ui/events/events.gyp:gesture_detection',
'../ui/gl/gl.gyp:gl',
'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
'../url/ipc/url_ipc.gyp:url_ipc',
'../v8/tools/gyp/v8.gyp:v8',
'android_webview_pak',
'android_webview_version',
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/chrome_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "base/macros.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
Expand Down
6 changes: 1 addition & 5 deletions chrome/chrome_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@
'<(DEPTH)/ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
'<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
'<(DEPTH)/url/url.gyp:url_lib',
'<(DEPTH)/url/ipc/url_ipc.gyp:url_ipc',
],
'sources': [
'<@(chrome_common_sources)'
Expand Down Expand Up @@ -497,10 +496,7 @@
],
}, {
# Non-Android.
'sources': [ '<@(chrome_common_importer_sources)' ],
'dependencies': [
'<(DEPTH)/url/ipc/url_ipc.gyp:url_ipc',
],
'sources': [ '<@(chrome_common_importer_sources)' ]
}],
['OS=="win"', {
'include_dirs': [
Expand Down
1 change: 1 addition & 0 deletions chrome/common/common_message_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ namespace IPC {
namespace IPC {
#include "chrome/common/common_message_generator.h"
} // namespace IPC

4 changes: 1 addition & 3 deletions chrome/common/common_message_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@

#include "chrome/common/benchmarking_messages.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/common_param_traits_macros.h"
#include "chrome/common/mac/app_shim_messages.h"
#include "chrome/common/prerender_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
#include "chrome/common/tts_messages.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/common_param_traits_macros.h"

#if defined(ENABLE_EXTENSIONS)
#include "chrome/common/cast_messages.h"
Expand All @@ -36,3 +33,4 @@
#if defined(ENABLE_WEBRTC)
#include "chrome/common/media/webrtc_logging_messages.h"
#endif

2 changes: 1 addition & 1 deletion chrome/common/importer/profile_import_process_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include "components/autofill/content/common/autofill_param_traits_macros.h"
#include "components/autofill/core/common/password_form.h"
#include "components/favicon_base/favicon_usage_data.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
#include "url/ipc/url_param_traits.h"

// Force multiple inclusion of the param traits file to generate all methods.
#undef CHROME_COMMON_IMPORTER_PROFILE_IMPORT_PROCESS_PARAM_TRAITS_MACROS_H_
Expand Down
2 changes: 1 addition & 1 deletion chrome/common/prerender_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

#include <stdint.h>

#include "content/public/common/common_param_traits.h"
#include "content/public/common/referrer.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
#include "ui/gfx/geometry/size.h"
#include "url/gurl.h"
#include "url/ipc/url_param_traits.h"

#define IPC_MESSAGE_START PrerenderMsgStart

Expand Down
8 changes: 2 additions & 6 deletions chrome/common/render_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,19 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/common/common_param_traits.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/ntp_logging_events.h"
#include "chrome/common/search_provider.h"
#include "chrome/common/web_application_info.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/top_controls_state.h"
#include "content/public/common/webplugininfo.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h"
#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerPromptReply.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
#include "ui/base/window_open_disposition.h"
#include "url/ipc/url_param_traits.h"

// Singly-included section for enums and custom IPC traits.
#ifndef CHROME_COMMON_RENDER_MESSAGES_H_
Expand Down
2 changes: 0 additions & 2 deletions chrome/renderer/chrome_render_frame_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "base/command_line.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/common/chrome_isolated_world_ids.h"
Expand All @@ -23,7 +22,6 @@
#include "chrome/renderer/prerender/prerender_helper.h"
#include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h"
#include "components/translate/content/renderer/translate_helper.h"
#include "content/public/common/ssl_status.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "extensions/common/constants.h"
Expand Down
1 change: 0 additions & 1 deletion components/autofill.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
'../url/url.gyp:url_lib',
'../url/ipc/url_ipc.gyp:url_ipc',
],
'include_dirs': [
'..',
Expand Down
2 changes: 1 addition & 1 deletion components/content_settings.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@
'dependencies': [
'content_settings_core_common',
'../base/base.gyp:base',
'../content/content.gyp:content_common',
'../ipc/ipc.gyp:ipc',
'../url/url.gyp:url_lib',
'../url/ipc/url_ipc.gyp:url_ipc',
],
'include_dirs': [
'..',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
// Multiply-included file, no traditional include guard.
#include "base/strings/string16.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/common_param_traits_macros.h"
#include "ipc/ipc_message_macros.h"
#include "url/gurl.h"
#include "url/ipc/url_param_traits.h"

#define IPC_MESSAGE_START ContentSettingsMsgStart

Expand Down
1 change: 0 additions & 1 deletion components/nacl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@
],
'dependencies': [
'../content/content.gyp:content_common',
'../url/ipc/url_ipc.gyp:url_ipc',
],
},
]
Expand Down
2 changes: 1 addition & 1 deletion components/nacl/common/nacl_host_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#include "components/nacl/common/nacl_types.h"
#include "components/nacl/common/nacl_types_param_traits.h"
#include "components/nacl/common/pnacl_types.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h"
#include "url/gurl.h"
#include "url/ipc/url_param_traits.h"

#define IPC_MESSAGE_START NaClHostMsgStart

Expand Down
1 change: 0 additions & 1 deletion components/nacl/loader/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ if (is_linux) {
"//crypto",
"//ipc",
"//sandbox/linux:sandbox_services",
"//url/ipc:url_ipc",
]

cflags = [ "-fPIE" ]
Expand Down
4 changes: 0 additions & 4 deletions components/network_hints.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@
{
# GN version: //components/network_hints/common
'target_name': 'network_hints_common',

'defines': [ 'URL_PARAM_TRAITS_FIX' ],

'type': 'static_library',
'include_dirs': [
'..',
],
'dependencies': [
'../base/base.gyp:base',
'../ui/accessibility/accessibility.gyp:accessibility',
'../url/ipc/url_ipc.gyp:url_ipc',
],
'sources': [
'network_hints/common/network_hints_common.cc',
Expand Down
2 changes: 1 addition & 1 deletion components/network_hints/common/network_hints_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#include <vector>

#include "components/network_hints/common/network_hints_common.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
#include "url/ipc/url_param_traits.h"

// Singly-included section for custom IPC traits.
#ifndef COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_MESSAGES_H_
Expand Down
1 change: 0 additions & 1 deletion components/network_hints/renderer/renderer_dns_prefetch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
#include "components/network_hints/common/network_hints_common.h"
#include "components/network_hints/common/network_hints_messages.h"
#include "components/network_hints/renderer/dns_prefetch_queue.h"
Expand Down
2 changes: 0 additions & 2 deletions components/password_manager.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@
'../content/content.gyp:content_common',
'../ipc/ipc.gyp:ipc',
'../third_party/WebKit/public/blink.gyp:blink_minimal',
'../url/ipc/url_ipc.gyp:url_ipc',
'password_manager_core_common',
],
'include_dirs': [
Expand All @@ -282,7 +281,6 @@
'../content/content.gyp:content_common',
'../ipc/ipc.gyp:ipc',
'../third_party/WebKit/public/blink.gyp:blink',
'../url/ipc/url_ipc.gyp:url_ipc',
'password_manager_core_common',
'password_manager_content_common',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#include "base/strings/string16.h"
#include "components/password_manager/core/common/credential_manager_types.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/common_param_traits_macros.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
#include "third_party/WebKit/public/platform/WebCredentialManagerError.h"
#include "url/gurl.h"
#include "url/ipc/url_param_traits.h"

#define IPC_MESSAGE_START CredentialManagerMsgStart

Expand Down
1 change: 0 additions & 1 deletion components/pdf.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
'<(DEPTH)/content/content.gyp:content_common',
'<(DEPTH)/ipc/ipc.gyp:ipc',
'<(DEPTH)/url/url.gyp:url_lib',
'<(DEPTH)/url/ipc/url_ipc.gyp:url_ipc',
],
'sources': [
'pdf/common/pdf_message_generator.cc',
Expand Down
2 changes: 1 addition & 1 deletion components/pdf/common/pdf_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
// Multiply-included file, no traditional include guard.
#include <string.h>

#include "content/public/common/common_param_traits.h"
#include "content/public/common/common_param_traits_macros.h"
#include "content/public/common/referrer.h"
#include "ipc/ipc_message_macros.h"
#include "url/gurl.h"
#include "url/ipc/url_param_traits.h"

#define IPC_MESSAGE_START PDFMsgStart

Expand Down
2 changes: 2 additions & 0 deletions components/safe_json/safe_json_parser_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <vector>

#include "base/strings/string16.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/common_param_traits_macros.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"

Expand Down
2 changes: 1 addition & 1 deletion components/translate.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@
'translate_core_common',
'translate_core_language_detection',
'../base/base.gyp:base',
'../content/content.gyp:content_common',
'../ipc/ipc.gyp:ipc',
'../url/ipc/url_ipc.gyp:url_ipc',
],
'include_dirs': [
'..',
Expand Down
2 changes: 1 addition & 1 deletion components/translate/content/common/translate_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include "components/translate/core/common/language_detection_details.h"
#include "components/translate/core/common/translate_errors.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
#include "url/ipc/url_param_traits.h"

#define IPC_MESSAGE_START TranslateMsgStart

Expand Down
5 changes: 2 additions & 3 deletions content/browser/frame_host/navigator_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "content/public/common/resource_response.h"
#include "content/public/common/url_constants.h"
#include "net/base/net_errors.h"
#include "url/url_constants.h"

namespace content {

Expand Down Expand Up @@ -291,8 +290,8 @@ bool NavigatorImpl::NavigateToEntry(

// The renderer will reject IPC messages with URLs longer than
// this limit, so don't attempt to navigate with a longer URL.
if (dest_url.spec().size() > url::kMaxURLChars) {
LOG(WARNING) << "Refusing to load URL as it exceeds " << url::kMaxURLChars
if (dest_url.spec().size() > kMaxURLChars) {
LOG(WARNING) << "Refusing to load URL as it exceeds " << kMaxURLChars
<< " characters.";
return false;
}
Expand Down
3 changes: 1 addition & 2 deletions content/browser/web_contents/web_contents_impl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#include "net/test/cert_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkColor.h"
#include "url/url_constants.h"

namespace content {
namespace {
Expand Down Expand Up @@ -489,7 +488,7 @@ TEST_F(WebContentsImplTest, SimpleNavigation) {
TEST_F(WebContentsImplTest, NavigateToExcessivelyLongURL) {
// Construct a URL that's kMaxURLChars + 1 long of all 'a's.
const GURL url(std::string("http://example.org/").append(
url::kMaxURLChars + 1, 'a'));
kMaxURLChars + 1, 'a'));

controller().LoadURL(
url, Referrer(), ui::PAGE_TRANSITION_GENERATED, std::string());
Expand Down
3 changes: 1 addition & 2 deletions content/child/plugin_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
#include "content/common/content_export.h"
#include "content/common/content_param_traits.h"
#include "content/common/cursors/webcursor.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/ipc/gfx_param_traits.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/surface/transport_dib.h"
#include "url/ipc/url_param_traits.h"

#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
Expand Down
7 changes: 3 additions & 4 deletions content/child/service_worker/service_worker_dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "content/public/common/content_constants.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h"
#include "url/url_constants.h"

using blink::WebServiceWorkerError;
using blink::WebServiceWorkerProvider;
Expand Down Expand Up @@ -111,8 +110,8 @@ void ServiceWorkerDispatcher::RegisterServiceWorker(
WebServiceWorkerRegistrationCallbacks* callbacks) {
DCHECK(callbacks);

if (pattern.possibly_invalid_spec().size() > url::kMaxURLChars ||
script_url.possibly_invalid_spec().size() > url::kMaxURLChars) {
if (pattern.possibly_invalid_spec().size() > kMaxURLChars ||
script_url.possibly_invalid_spec().size() > kMaxURLChars) {
scoped_ptr<WebServiceWorkerRegistrationCallbacks>
owned_callbacks(callbacks);
std::string error_message(kServiceWorkerRegisterErrorPrefix);
Expand Down Expand Up @@ -162,7 +161,7 @@ void ServiceWorkerDispatcher::GetRegistration(
WebServiceWorkerGetRegistrationCallbacks* callbacks) {
DCHECK(callbacks);

if (document_url.possibly_invalid_spec().size() > url::kMaxURLChars) {
if (document_url.possibly_invalid_spec().size() > kMaxURLChars) {
scoped_ptr<WebServiceWorkerGetRegistrationCallbacks> owned_callbacks(
callbacks);
std::string error_message(kServiceWorkerGetRegistrationErrorPrefix);
Expand Down
Loading

0 comments on commit 08ebff8

Please sign in to comment.