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

Unified Diff: ios/web/public/crw_browsing_data_store.h

Issue 1154923003: Fixing an edge case in CRWBrowsingDataStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/public/crw_browsing_data_store.h
diff --git a/ios/web/public/crw_browsing_data_store.h b/ios/web/public/crw_browsing_data_store.h
index da2fef3c85d079b18a56adc44eab395f09e1c7ed..4a04d41480254332c17c86bd00921458ff36b6b7 100644
--- a/ios/web/public/crw_browsing_data_store.h
+++ b/ios/web/public/crw_browsing_data_store.h
@@ -43,26 +43,27 @@ enum CRWBrowsingDataStoreMode {
// Returns a set of all available browsing data types.
+ (NSSet*)allBrowsingDataTypes;
-// The mode that the CRWBrowsingDataStore is in.
+// The mode that the CRWBrowsingDataStore is in. KVO compliant.
@property(nonatomic, assign, readonly) CRWBrowsingDataStoreMode mode;
// TODO(shreyasv): Verify the preconditions for the following 3 methods when
// web::WebViewCounter class is implemented. crbug.com/480507
// Changes the mode to |ACTIVE|.
-// |completionHandler| is called on the main thread.
+// |completionHandler| is called on the main thread. This block has no return
+// value and takes a single Boolean argument that indicates whether or not the
Eugene But (OOO till 7-30) 2015/05/29 21:14:26 NIT: s/Boolean/BOOL, because Boolean is an actual
shreyasv1 2015/05/29 22:22:57 well, this is modeled after the comment in https:
+// the mode was successfully changed to |ACTIVE|.
Eugene But (OOO till 7-30) 2015/05/29 21:14:26 Please describe cases where completion handler is
shreyasv1 2015/05/29 22:22:57 Done.
// Precondition: There must be no web views associated with the BrowserState.
-// Note: If there is another operation driven to change the mode, the mode will
-// still be |SYNCHRONIZING| rather than |ACTIVE| when the callback is received.
-- (void)makeActiveWithCompletionHandler:(ProceduralBlock)completionHandler;
+- (void)makeActiveWithCompletionHandler:
+ (void (^)(BOOL success))completionHandler;
// Changes the mode to |INACTIVE|.
-// |completionHandler| is called on the main thread.
+// |completionHandler| is called on the main thread. This block has no return
+// value and takes a single Boolean argument that indicates whether or not the
+// the mode was successfully changed to |INACTIVE|.
Eugene But (OOO till 7-30) 2015/05/29 21:14:26 Same thing, please describe failure case
shreyasv1 2015/05/29 22:22:57 Done.
// Precondition: There must be no web views associated with the BrowserState.
-// Note: If there is another operation driven to change the mode, the mode will
-// still be |SYNCHRONIZING| rather than |INACTIVE| when the callback is
-// received.
-- (void)makeInactiveWithCompletionHandler:(ProceduralBlock)completionHandler;
+- (void)makeInactiveWithCompletionHandler:
+ (void (^)(BOOL success))completionHandler;
// Removes all browsing data of the provided |browsingDataTypes|.
// |completionHandler| is called on the main thread after the browsing data has
« ios/web/crw_browsing_data_store_unittest.mm ('K') | « ios/web/crw_browsing_data_store_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698