Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: content/child/service_worker/service_worker_dispatcher.cc

Issue 1497743005: Allow huge data: URIs only via WebView.loadDataWithBaseUrl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the test Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/child/service_worker/service_worker_dispatcher.cc
diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
index 30304f01c6763d70f48c65bdfc71a563048b0fcc..4793e0976368e93b951e4434f60467de2d738ec9 100644
--- a/content/child/service_worker/service_worker_dispatcher.cc
+++ b/content/child/service_worker/service_worker_dispatcher.cc
@@ -19,7 +19,7 @@
#include "content/child/webmessageportchannel_impl.h"
#include "content/common/service_worker/service_worker_messages.h"
#include "content/common/service_worker/service_worker_types.h"
-#include "content/public/common/url_utils.h"
+#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"
@@ -111,8 +111,8 @@ void ServiceWorkerDispatcher::RegisterServiceWorker(
WebServiceWorkerRegistrationCallbacks* callbacks) {
DCHECK(callbacks);
- if (pattern.possibly_invalid_spec().size() > GetMaxURLChars() ||
- script_url.possibly_invalid_spec().size() > GetMaxURLChars()) {
+ 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);
@@ -162,7 +162,7 @@ void ServiceWorkerDispatcher::GetRegistration(
WebServiceWorkerGetRegistrationCallbacks* callbacks) {
DCHECK(callbacks);
- if (document_url.possibly_invalid_spec().size() > GetMaxURLChars()) {
+ if (document_url.possibly_invalid_spec().size() > kMaxURLChars) {
scoped_ptr<WebServiceWorkerGetRegistrationCallbacks> owned_callbacks(
callbacks);
std::string error_message(kServiceWorkerGetRegistrationErrorPrefix);
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/common/common_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698