| 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 #include "ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_i
o_data.h" | 5 #include "ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_i
o_data.h" |
| 6 | 6 |
| 7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 handle->DoomIncognitoCache(); | 57 handle->DoomIncognitoCache(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace | 60 } // namespace |
| 61 | 61 |
| 62 void OffTheRecordChromeBrowserStateIOData::Handle::DoomIncognitoCache() { | 62 void OffTheRecordChromeBrowserStateIOData::Handle::DoomIncognitoCache() { |
| 63 // The cache for the incognito profile is in RAM. | 63 // The cache for the incognito profile is in RAM. |
| 64 scoped_refptr<net::URLRequestContextGetter> getter = | 64 scoped_refptr<net::URLRequestContextGetter> getter = |
| 65 main_request_context_getter_; | 65 main_request_context_getter_; |
| 66 web::WebThread::PostTask( | 66 web::WebThread::PostTask( |
| 67 web::WebThread::IO, FROM_HERE, base::BindBlock(^{ | 67 web::WebThread::IO, FROM_HERE, base::BindBlockArc(^{ |
| 68 DCHECK_CURRENTLY_ON(web::WebThread::IO); | 68 DCHECK_CURRENTLY_ON(web::WebThread::IO); |
| 69 net::HttpCache* cache = getter->GetURLRequestContext() | 69 net::HttpCache* cache = getter->GetURLRequestContext() |
| 70 ->http_transaction_factory() | 70 ->http_transaction_factory() |
| 71 ->GetCache(); | 71 ->GetCache(); |
| 72 if (!cache->GetCurrentBackend()) | 72 if (!cache->GetCurrentBackend()) |
| 73 return; | 73 return; |
| 74 cache->GetCurrentBackend()->DoomAllEntries(base::Bind(&DoNothing)); | 74 cache->GetCurrentBackend()->DoomAllEntries(base::Bind(&DoNothing)); |
| 75 })); | 75 })); |
| 76 } | 76 } |
| 77 | 77 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 NOTREACHED(); | 232 NOTREACHED(); |
| 233 return nullptr; | 233 return nullptr; |
| 234 } | 234 } |
| 235 | 235 |
| 236 ChromeBrowserStateIOData::AppRequestContext* | 236 ChromeBrowserStateIOData::AppRequestContext* |
| 237 OffTheRecordChromeBrowserStateIOData::AcquireIsolatedAppRequestContext( | 237 OffTheRecordChromeBrowserStateIOData::AcquireIsolatedAppRequestContext( |
| 238 net::URLRequestContext* main_context) const { | 238 net::URLRequestContext* main_context) const { |
| 239 NOTREACHED(); | 239 NOTREACHED(); |
| 240 return nullptr; | 240 return nullptr; |
| 241 } | 241 } |
| OLD | NEW |