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

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

Issue 1215433003: CL for Objective-C readability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_WEB_CRW_BROWSING_DATA_STORE_H_ 5 #ifndef IOS_WEB_CRW_BROWSING_DATA_STORE_H_
6 #define IOS_WEB_CRW_BROWSING_DATA_STORE_H_ 6 #define IOS_WEB_CRW_BROWSING_DATA_STORE_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #import "base/ios/block_types.h" 10 #import "base/ios/block_types.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // state of the |web::ActiveStateManager| associated with |browserState|. 47 // state of the |web::ActiveStateManager| associated with |browserState|.
48 - (instancetype)initWithBrowserState:(web::BrowserState*)browserState 48 - (instancetype)initWithBrowserState:(web::BrowserState*)browserState
49 NS_DESIGNATED_INITIALIZER; 49 NS_DESIGNATED_INITIALIZER;
50 50
51 // The delegate that is consulted when the mode needs to change. 51 // The delegate that is consulted when the mode needs to change.
52 @property(nonatomic, weak) id<CRWBrowsingDataStoreDelegate> delegate; 52 @property(nonatomic, weak) id<CRWBrowsingDataStoreDelegate> delegate;
53 53
54 // The mode that the CRWBrowsingDataStore is in. KVO compliant. 54 // The mode that the CRWBrowsingDataStore is in. KVO compliant.
55 @property(nonatomic, assign, readonly) web::BrowsingDataStoreMode mode; 55 @property(nonatomic, assign, readonly) web::BrowsingDataStoreMode mode;
56 56
57 // TODO(shreyasv): Verify the preconditions for the following 3 methods when 57 // TODO(shreyasv): Verify the preconditions for the following 3 methods when
stuartmorgan 2015/06/30 21:57:18 Isn't this an implementation note, not an interfac
shreyasv1 2015/07/07 21:42:06 Done.
58 // web::WebViewCounter class is implemented. crbug.com/480507 58 // web::WebViewCounter class is implemented. crbug.com/480507
59 59
60 // Changes the mode to |ACTIVE|. 60 // Changes the mode to |ACTIVE|.
61 // if there is no delegate present, the default behavior of this method is to 61 // if there is no delegate present, the default behavior of this method is to
stuartmorgan 2015/06/30 21:57:18 If
shreyasv1 2015/07/07 21:42:05 Done.
62 // restore browsing data from |browserState|'s stash path to the canonical path 62 // restore browsing data from |browserState|'s stash path to the canonical path
63 // where web views read/write browsing data to. 63 // where web views read/write browsing data to.
64 // |completionHandler| is called on the main thread. This block has no return 64 // |completionHandler| is called on the main thread. This block has no return
65 // value and takes a single BOOL argument that indicates whether or not the 65 // value and takes a single BOOL argument that indicates whether or not the
66 // the mode was successfully changed to |ACTIVE|. 66 // the mode was successfully changed to |ACTIVE|.
67 // The mode change to |ACTIVE| can fail if another |makeActive| or 67 // The mode change to |ACTIVE| can fail if another |makeActive| or
68 // |makeInactive| was enqueued after this call. 68 // |makeInactive| was enqueued after this call.
69 // Precondition: There must be no web views associated with the BrowserState. 69 // Precondition: There must be no web views associated with the BrowserState.
70 - (void)makeActiveWithCompletionHandler: 70 - (void)makeActiveWithCompletionHandler:
71 (void (^)(BOOL success))completionHandler; 71 (void (^)(BOOL success))completionHandler;
72 72
73 // Changes the mode to |INACTIVE|. 73 // Changes the mode to |INACTIVE|.
74 // if there is no delegate present, the default behavior of this method is to 74 // if there is no delegate present, the default behavior of this method is to
stuartmorgan 2015/06/30 21:57:18 If
shreyasv1 2015/07/07 21:42:06 Done.
75 // value and takes a single BOOL argument that indicates whether or not the 75 // value and takes a single BOOL argument that indicates whether or not the
stuartmorgan 2015/06/30 21:57:18 Looks like a line or two of comments is missing.
shreyasv1 2015/07/07 21:42:05 Done.
76 // stash browsing data created by the web view in to |browserState|'s stash 76 // stash browsing data created by the web view in to |browserState|'s stash
77 // path. 77 // path.
78 // |completionHandler| is called on the main thread. This block has no return 78 // |completionHandler| is called on the main thread. This block has no return
79 // value and takes a single BOOL argument that indicates whether or not the 79 // value and takes a single BOOL argument that indicates whether or not the
80 // the mode was successfully changed to |INACTIVE|. 80 // the mode was successfully changed to |INACTIVE|.
stuartmorgan 2015/06/30 21:57:18 ... or maybe just partially duplicated
shreyasv1 2015/07/07 21:42:06 Done.
81 // The mode change to |ACTIVE| can fail if another |makeActive| or 81 // The mode change to |ACTIVE| can fail if another |makeActive| or
stuartmorgan 2015/06/30 21:57:18 INACTIVE
shreyasv1 2015/07/07 21:42:06 Done.
82 // |makeInactive| was enqueued after this call. 82 // |makeInactive| was enqueued after this call.
83 // Precondition: There must be no web views associated with the BrowserState. 83 // Precondition: There must be no web views associated with the BrowserState.
84 - (void)makeInactiveWithCompletionHandler: 84 - (void)makeInactiveWithCompletionHandler:
85 (void (^)(BOOL success))completionHandler; 85 (void (^)(BOOL success))completionHandler;
86 86
87 // Removes all browsing data of the provided |browsingDataTypes|. 87 // Removes all browsing data of the provided |browsingDataTypes|.
88 // |completionHandler| is called on the main thread after the browsing data has 88 // |completionHandler| is called on the main thread after the browsing data has
89 // been removed. 89 // been removed.
90 // Precondition: There must be no web views associated with the BrowserState. 90 // Precondition: There must be no web views associated with the BrowserState.
91 - (void)removeDataOfTypes:(web::BrowsingDataTypes)browsingDataTypes 91 - (void)removeDataOfTypes:(web::BrowsingDataTypes)browsingDataTypes
92 completionHandler:(ProceduralBlock)completionHandler; 92 completionHandler:(ProceduralBlock)completionHandler;
93 93
94 // Returns YES if there is still a pending operation that has not finished 94 // Returns YES if there is still a pending operation that has not finished
stuartmorgan 2015/06/30 21:57:18 Properties should not use the method descriptive v
shreyasv1 2015/07/07 21:42:06 Done.
95 // running. Creating web views (UIWebViews and WKWebViews) with this 95 // running. Creating web views (UIWebViews and WKWebViews) with this
96 // CRWBrowsingDataStore when there are pending operations is undefined 96 // CRWBrowsingDataStore when there are pending operations is undefined
stuartmorgan 2015/06/30 21:57:18 s/is/results in/
shreyasv1 2015/07/07 21:42:05 Done.
97 // behavior. 97 // behavior.
98 @property(nonatomic, assign, readonly) BOOL hasPendingOperations; 98 @property(nonatomic, assign, readonly) BOOL hasPendingOperations;
stuartmorgan 2015/06/30 21:57:18 This should be declared up with the other properti
shreyasv1 2015/07/07 21:42:06 Done.
99 99
100 @end 100 @end
101 101
102 #endif // IOS_WEB_CRW_BROWSING_DATA_STORE_H_ 102 #endif // IOS_WEB_CRW_BROWSING_DATA_STORE_H_
103
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698