Add ICU message format support
[chromium-blink-merge.git] / ios / web / public / crw_browsing_data_store_delegate.h
blob63fa964919d3a4fc46c46b0db01bc7b010d55e63
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
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_CRW_BROWSING_DATA_STORE_DELEGATE_H_
6 #define IOS_WEB_CRW_BROWSING_DATA_STORE_DELEGATE_H_
8 #import <Foundation/Foundation.h>
10 @class CRWBrowsingDataStore;
12 namespace web {
14 // The policy to pass back to the CRWBrowsingDataStore when the
15 // CRWBrowsingDataStore's mode wants to become |ACTIVE|.
16 typedef NS_ENUM(NSUInteger, BrowsingDataStoreMakeActivePolicy) {
17 // Adopt browsing data to the canonical path where web views store their
18 // browsing data.
19 ADOPT = 1,
20 // Restore browsing data from the stash path. This is the default policy and
21 // is the same policy that is used if the delegate was not implemented.
22 RESTORE,
25 // The policy to pass back to the CRWBrowsingDataStore when the
26 // CRWBrowsingDataStore's mode wants to become |INACTIVE|.
27 typedef NS_ENUM(NSUInteger, BrowsingDataStoreMakeInactivePolicy) {
28 // Delete browsing data created by the web views.
29 DELETE = 1,
30 // Stash browsing data created by the web views. This is the default policy
31 // and is the same policy that is used if the delegate was not implemented.
32 STASH,
35 } // namespace web
37 // The CRWBrowsingDataStoreDelegate has methods that can override the default
38 // behavior of a CRWBrowsingDataStore when a mode change occurs.
39 @protocol CRWBrowsingDataStoreDelegate<NSObject>
41 // Called when a CRWBrowsingDataStore wants to change its mode to |ACTIVE|.
42 - (web::BrowsingDataStoreMakeActivePolicy)
43 decideMakeActiveOperationPolicyForBrowsingDataStore:
44 (CRWBrowsingDataStore*)browsingDataStore;
46 // Called when a CRWBrowsingDataStore wants to change its mode to |INACTIVE|.
47 - (web::BrowsingDataStoreMakeInactivePolicy)
48 decideMakeInactiveOperationPolicyForBrowsingDataStore:
49 (CRWBrowsingDataStore*)browsingDataStore;
51 @end
53 #endif // IOS_WEB_CRW_BROWSING_DATA_STORE_DELEGATE_H_