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

Side by Side Diff: content/common/navigation_params.h

Issue 1497743005: Allow huge data: URIs only via WebView.loadDataWithBaseUrl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make specific to Android, use RefCountedString 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ 5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_
6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ 6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/frame_message_enums.h" 13 #include "content/common/frame_message_enums.h"
14 #include "content/public/common/page_state.h" 14 #include "content/public/common/page_state.h"
15 #include "content/public/common/referrer.h" 15 #include "content/public/common/referrer.h"
16 #include "content/public/common/request_context_type.h" 16 #include "content/public/common/request_context_type.h"
17 #include "ui/base/page_transition_types.h" 17 #include "ui/base/page_transition_types.h"
18 #include "url/gurl.h" 18 #include "url/gurl.h"
19 19
20 namespace base {
21 class RefCountedMemory;
22 }
23
24 namespace content { 20 namespace content {
25 21
26 // The LoFi state which determines whether to add the Lo-Fi header. 22 // The LoFi state which determines whether to add the Lo-Fi header.
27 enum LoFiState { 23 enum LoFiState {
28 // Let the browser process decide whether or not to request the Lo-Fi version. 24 // Let the browser process decide whether or not to request the Lo-Fi version.
29 LOFI_UNSPECIFIED = 0, 25 LOFI_UNSPECIFIED = 0,
30 26
31 // Request a normal (non-Lo-Fi) version of the resource. 27 // Request a normal (non-Lo-Fi) version of the resource.
32 LOFI_OFF, 28 LOFI_OFF,
33 29
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 // PlzNavigate 294 // PlzNavigate
299 // Whether a ServiceWorkerProviderHost should be created for the window. 295 // Whether a ServiceWorkerProviderHost should be created for the window.
300 bool should_create_service_worker; 296 bool should_create_service_worker;
301 297
302 // PlzNavigate 298 // PlzNavigate
303 // The ServiceWorkerProviderHost ID used for navigations, if it was already 299 // The ServiceWorkerProviderHost ID used for navigations, if it was already
304 // created by the browser. Set to kInvalidServiceWorkerProviderId otherwise. 300 // created by the browser. Set to kInvalidServiceWorkerProviderId otherwise.
305 // This parameter is not used in the current navigation architecture, where 301 // This parameter is not used in the current navigation architecture, where
306 // it will always be equal to kInvalidServiceWorkerProviderId. 302 // it will always be equal to kInvalidServiceWorkerProviderId.
307 int service_worker_provider_id; 303 int service_worker_provider_id;
304
305 #if defined(OS_ANDROID)
306 // The real content of the data: URL. Used to circumvent the restriction
Charlie Reis 2015/12/14 20:35:57 nit: Can you add something about how this is only
mnaganov (inactive) 2015/12/15 18:30:29 Done.
307 // on the GURL max length.
308 std::string data_url_as_string;
309 #endif
308 }; 310 };
309 311
310 // Helper struct keeping track in one place of all the parameters the browser 312 // Helper struct keeping track in one place of all the parameters the browser
311 // needs to provide to the renderer. 313 // needs to provide to the renderer.
312 struct NavigationParams { 314 struct NavigationParams {
313 NavigationParams(const CommonNavigationParams& common_params, 315 NavigationParams(const CommonNavigationParams& common_params,
314 const StartNavigationParams& start_params, 316 const StartNavigationParams& start_params,
315 const RequestNavigationParams& request_params); 317 const RequestNavigationParams& request_params);
316 ~NavigationParams(); 318 ~NavigationParams();
317 319
318 CommonNavigationParams common_params; 320 CommonNavigationParams common_params;
319 StartNavigationParams start_params; 321 StartNavigationParams start_params;
320 RequestNavigationParams request_params; 322 RequestNavigationParams request_params;
321 }; 323 };
322 324
323 } // namespace content 325 } // namespace content
324 326
325 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 327 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698