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