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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 2558943002: Explicitly make BrowserThread::SetDelegate specific to the IO thread. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | content/browser/browser_thread_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 value = policy_service 427 value = policy_service
428 ->GetPolicies(policy::PolicyNamespace( 428 ->GetPolicies(policy::PolicyNamespace(
429 policy::POLICY_DOMAIN_CHROME, std::string())) 429 policy::POLICY_DOMAIN_CHROME, std::string()))
430 .GetValue(policy::key::kHttp09OnNonDefaultPortsEnabled); 430 .GetValue(policy::key::kHttp09OnNonDefaultPortsEnabled);
431 if (value) 431 if (value)
432 value->GetAsBoolean(&http_09_on_non_default_ports_enabled_); 432 value->GetAsBoolean(&http_09_on_non_default_ports_enabled_);
433 433
434 chrome_browser_net::SetGlobalSTHDistributor( 434 chrome_browser_net::SetGlobalSTHDistributor(
435 std::unique_ptr<net::ct::STHDistributor>(new net::ct::STHDistributor())); 435 std::unique_ptr<net::ct::STHDistributor>(new net::ct::STHDistributor()));
436 436
437 BrowserThread::SetDelegate(BrowserThread::IO, this); 437 BrowserThread::SetIOThreadDelegate(this);
438 } 438 }
439 439
440 IOThread::~IOThread() { 440 IOThread::~IOThread() {
441 // This isn't needed for production code, but in tests, IOThread may 441 // This isn't needed for production code, but in tests, IOThread may
442 // be multiply constructed. 442 // be multiply constructed.
443 BrowserThread::SetDelegate(BrowserThread::IO, NULL); 443 BrowserThread::SetIOThreadDelegate(nullptr);
444 444
445 pref_proxy_config_tracker_->DetachFromPrefService(); 445 pref_proxy_config_tracker_->DetachFromPrefService();
446 DCHECK(!globals_); 446 DCHECK(!globals_);
447 447
448 // Destroy the old distributor to check that the observers list it holds is 448 // Destroy the old distributor to check that the observers list it holds is
449 // empty. 449 // empty.
450 chrome_browser_net::SetGlobalSTHDistributor(nullptr); 450 chrome_browser_net::SetGlobalSTHDistributor(nullptr);
451 } 451 }
452 452
453 IOThread::Globals* IOThread::globals() { 453 IOThread::Globals* IOThread::globals() {
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1088
1089 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1089 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1090 // system URLRequestContext too. There's no reason this should be tied to a 1090 // system URLRequestContext too. There's no reason this should be tied to a
1091 // profile. 1091 // profile.
1092 return context; 1092 return context;
1093 } 1093 }
1094 1094
1095 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { 1095 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() {
1096 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); 1096 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread);
1097 } 1097 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698