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

Side by Side Diff: ios/web/public/crw_navigation_item_storage.h

Issue 2664113003: Moved serialization out of CRWSessionEntry. (Closed)
Patch Set: BuildSerialization => BuildStorage, entries => itemStorages Created 3 years, 10 months 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_
6 #define IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_
7
8 #import <Foundation/Foundation.h>
9 #include <stddef.h>
10
11 #include "base/strings/string16.h"
12 #include "base/time/time.h"
13 #include "ios/web/public/referrer.h"
14 #include "ios/web/public/web_state/page_display_state.h"
15 #include "url/gurl.h"
16
17 namespace web {
18
19 // Keys used to serialize navigation properties.
20
21 // Current URL (std::string).
22 extern NSString* const kNavigationItemStorageURLKey;
23 // Current URL. Deprecated, used for backward compatibility (NSURL).
24 extern NSString* const kNavigationItemStorageURLDeperecatedKey;
25 // Page referrer URL (std::string).
26 extern NSString* const kNavigationItemStorageReferrerURLKey;
27 // Page referrer URL (NSURL). Deprecated, used for backward compatibility.
28 extern NSString* const kNavigationItemStorageReferrerURLDeprecatedKey;
29 // Page referrer policy (int).
30 extern NSString* const kNavigationItemStorageReferrerPolicyKey;
31 // The time at which the last known local navigation has completed (int64_t).
32 extern NSString* const kNavigationItemStorageTimestampKey;
33 // Page title (NSString).
34 extern NSString* const kNavigationItemStorageTitleKey;
35 // The PageDisplayState (NSDictionary).
36 extern NSString* const kNavigationItemStoragePageDisplayStateKey;
37 // POST request data (NSData).
38 extern NSString* const kNavigationItemStoragePOSTDataKey;
39 // HTTP request headers (NSDictionary).
40 extern NSString* const kNavigationItemStorageHTTPRequestHeadersKey;
41 // Whether or not to bypass showing the resubmit data confirmation when loading
42 // a POST request (BOOL).
43 extern NSString* const kNavigationItemStorageSkipRepostFormConfirmationKey;
44 // Should desktop user agent be used (BOOL)?
45 extern NSString* const kNavigationItemStorageUseDesktopUserAgentKey;
46
47 } // namespace web
48
49 // NSCoding-compliant class used to serialize NavigationItem's persisted
50 // properties.
51 @interface CRWNavigationItemStorage : NSObject<NSCoding>
52
53 @property(nonatomic, assign) GURL virtualURL;
54 @property(nonatomic, assign) web::Referrer referrer;
55 @property(nonatomic, assign) base::Time timestamp;
56 @property(nonatomic, assign) base::string16 title;
57 @property(nonatomic, assign) web::PageDisplayState displayState;
58 @property(nonatomic, assign) BOOL shouldSkipRepostFormConfirmation;
59 @property(nonatomic, assign, getter=isOverridingUserAgent)
60 BOOL overridingUserAgent;
61 @property(nonatomic, copy) NSData* POSTData;
62 @property(nonatomic, copy) NSDictionary* HTTPRequestHeaders;
63
64 @end
65
66 #endif // IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698