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

Side by Side Diff: ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc

Issue 2041863002: Remove HttpServerProperies::GetWeakPtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 months 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/chrome_browser_state_io_data.h" 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 GetApplicationContext()->GetLocalState()); 311 GetApplicationContext()->GetLocalState());
312 enable_metrics_.MoveToThread( 312 enable_metrics_.MoveToThread(
313 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO)); 313 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO));
314 } 314 }
315 315
316 bool ChromeBrowserStateIOData::GetMetricsEnabledStateOnIOThread() const { 316 bool ChromeBrowserStateIOData::GetMetricsEnabledStateOnIOThread() const {
317 DCHECK_CURRENTLY_ON(web::WebThread::IO); 317 DCHECK_CURRENTLY_ON(web::WebThread::IO);
318 return enable_metrics_.GetValue(); 318 return enable_metrics_.GetValue();
319 } 319 }
320 320
321 base::WeakPtr<net::HttpServerProperties> 321 net::HttpServerProperties* ChromeBrowserStateIOData::http_server_properties()
322 ChromeBrowserStateIOData::http_server_properties() const { 322 const {
323 return http_server_properties_->GetWeakPtr(); 323 return http_server_properties_.get();
324 } 324 }
325 325
326 void ChromeBrowserStateIOData::set_http_server_properties( 326 void ChromeBrowserStateIOData::set_http_server_properties(
327 std::unique_ptr<net::HttpServerProperties> http_server_properties) const { 327 std::unique_ptr<net::HttpServerProperties> http_server_properties) const {
328 http_server_properties_ = std::move(http_server_properties); 328 http_server_properties_ = std::move(http_server_properties);
329 } 329 }
330 330
331 void ChromeBrowserStateIOData::Init( 331 void ChromeBrowserStateIOData::Init(
332 ProtocolHandlerMap* protocol_handlers) const { 332 ProtocolHandlerMap* protocol_handlers) const {
333 // The basic logic is implemented here. The specific initialization 333 // The basic logic is implemented here. The specific initialization
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 return std::unique_ptr<net::HttpCache>( 480 return std::unique_ptr<net::HttpCache>(
481 new net::HttpCache(session, std::move(main_backend), true)); 481 new net::HttpCache(session, std::move(main_backend), true));
482 } 482 }
483 483
484 std::unique_ptr<net::HttpCache> ChromeBrowserStateIOData::CreateHttpFactory( 484 std::unique_ptr<net::HttpCache> ChromeBrowserStateIOData::CreateHttpFactory(
485 net::HttpNetworkSession* shared_session, 485 net::HttpNetworkSession* shared_session,
486 std::unique_ptr<net::HttpCache::BackendFactory> backend) const { 486 std::unique_ptr<net::HttpCache::BackendFactory> backend) const {
487 return std::unique_ptr<net::HttpCache>( 487 return std::unique_ptr<net::HttpCache>(
488 new net::HttpCache(shared_session, std::move(backend), true)); 488 new net::HttpCache(shared_session, std::move(backend), true));
489 } 489 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/browser_state/chrome_browser_state_io_data.h ('k') | ios/chrome/browser/ios_chrome_io_thread.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698