Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm

Issue 2522943003: [iOS/ARC] Fix a violation of ODR in base::BindBlock under ARC. (Closed)
Patch Set: Use EXPECT_NSEQ instead of EXPECT_EQ/EXPECT_TRUE. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « base/mac/scoped_nsobject_unittest_arc.mm ('k') | ios/chrome/browser/share_extension/share_extension_item_receiver.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698