Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / ios / web / public / browsing_data_partition.h
blobe7af73604b1d11c720604fb88ff4468d7456cedd
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_PUBLIC_BROWSING_DATA_PARTITION_H_
6 #define IOS_WEB_PUBLIC_BROWSING_DATA_PARTITION_H_
8 #include "base/macros.h"
10 #if defined(__OBJC__)
11 @class CRWBrowsingDataStore;
12 #else // __OBJC__
13 class CRWBrowsingDataStore;
14 #endif // __OBJC__
16 namespace web {
18 class BrowserState;
20 // Manages the browsing data associated with a particular BrowserState.
21 // Not thread safe. Must be used only on the main thread.
22 class BrowsingDataPartition {
23 public:
24 // Returns true if the BrowsingDataParition is synchronized.
25 // There is a moment of time when an ActiveStateManager's active state is out
26 // of sync with its associated CRWBrowsingDataStore's mode, this method's
27 // return value reflects that.
28 // If the BrowsingDataPartition is synchronized, every CRWBrowsingDataStore's
29 // mode matches its associated ActiveStateManager's active state.
30 // If BrowsingDataPartition is not synchronized, this means that a
31 // CRWBrowsingDataStore's mode is in the process of changing to its associated
32 // ActiveStateManager's active state.
33 static bool IsSynchronized();
35 // Returns the underlying CRWBrowsingDataStore.
36 virtual CRWBrowsingDataStore* GetBrowsingDataStore() = 0;
38 protected:
39 virtual ~BrowsingDataPartition(){};
42 } // namespace web
44 #endif // IOS_WEB_PUBLIC_BROWSING_DATA_PARTITION_H_