OLD | NEW |
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 #import "ios/chrome/browser/browsing_data/browsing_data_removal_controller.h" | 5 #import "ios/chrome/browser/browsing_data/browsing_data_removal_controller.h" |
6 | 6 |
7 #import <WebKit/WebKit.h> | 7 #import <WebKit/WebKit.h> |
8 | 8 |
| 9 #include <cstdint> |
9 #include <memory> | 10 #include <memory> |
10 | 11 |
11 #include "base/bind.h" | 12 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
13 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
14 #include "base/logging.h" | 15 #include "base/logging.h" |
15 #import "base/mac/bind_objc_block.h" | 16 #import "base/mac/bind_objc_block.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "components/open_from_clipboard/clipboard_recent_content.h" | 18 #include "components/open_from_clipboard/clipboard_recent_content.h" |
18 #include "components/signin/ios/browser/account_consistency_service.h" | 19 #include "components/signin/ios/browser/account_consistency_service.h" |
(...skipping 13 matching lines...) Expand all Loading... |
32 #include "net/ssl/channel_id_store.h" | 33 #include "net/ssl/channel_id_store.h" |
33 #include "net/url_request/url_request_context.h" | 34 #include "net/url_request/url_request_context.h" |
34 #include "net/url_request/url_request_context_getter.h" | 35 #include "net/url_request/url_request_context_getter.h" |
35 | 36 |
36 #if !defined(__has_feature) || !__has_feature(objc_arc) | 37 #if !defined(__has_feature) || !__has_feature(objc_arc) |
37 #error "This file requires ARC support." | 38 #error "This file requires ARC support." |
38 #endif | 39 #endif |
39 | 40 |
40 namespace { | 41 namespace { |
41 // Empty callback used by DeleteAllCreatedBetweenAsync below. | 42 // Empty callback used by DeleteAllCreatedBetweenAsync below. |
42 void DoNothing(int n) {} | 43 void DoNothing(uint32_t n) {} |
43 } | 44 } |
44 | 45 |
45 @interface BrowsingDataRemovalController () | 46 @interface BrowsingDataRemovalController () |
46 // Removes browsing data that is created by web views associated with | 47 // Removes browsing data that is created by web views associated with |
47 // |browserState|. |mask| is obtained from | 48 // |browserState|. |mask| is obtained from |
48 // IOSChromeBrowsingDataRemover::RemoveDataMask. |deleteBegin| defines the begin | 49 // IOSChromeBrowsingDataRemover::RemoveDataMask. |deleteBegin| defines the begin |
49 // time from which the data has to be removed, up to the present time. | 50 // time from which the data has to be removed, up to the present time. |
50 // |completionHandler| is called when this operation finishes. This method | 51 // |completionHandler| is called when this operation finishes. This method |
51 // finishes removal of the browsing data even if |browserState| is destroyed | 52 // finishes removal of the browsing data even if |browserState| is destroyed |
52 // after this method call. | 53 // after this method call. |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 426 |
426 - (BOOL)hasPendingRemovalOperations:(ios::ChromeBrowserState*)browserState { | 427 - (BOOL)hasPendingRemovalOperations:(ios::ChromeBrowserState*)browserState { |
427 return _pendingRemovalCount[browserState] != 0; | 428 return _pendingRemovalCount[browserState] != 0; |
428 } | 429 } |
429 | 430 |
430 - (void)browserStateDestroyed:(ios::ChromeBrowserState*)browserState { | 431 - (void)browserStateDestroyed:(ios::ChromeBrowserState*)browserState { |
431 _pendingRemovalCount.erase(browserState); | 432 _pendingRemovalCount.erase(browserState); |
432 } | 433 } |
433 | 434 |
434 @end | 435 @end |
OLD | NEW |