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: chrome/browser/io_thread.cc

Issue 369703003: Reduce usage of MessageLoopProxy in base/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « base/threading/worker_pool.h ('k') | chrome/browser/media/media_device_id_salt.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 <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 473
474 base::Value* dns_client_enabled_default = new base::FundamentalValue( 474 base::Value* dns_client_enabled_default = new base::FundamentalValue(
475 chrome_browser_net::ConfigureAsyncDnsFieldTrial()); 475 chrome_browser_net::ConfigureAsyncDnsFieldTrial());
476 local_state->SetDefaultPrefValue(prefs::kBuiltInDnsClientEnabled, 476 local_state->SetDefaultPrefValue(prefs::kBuiltInDnsClientEnabled,
477 dns_client_enabled_default); 477 dns_client_enabled_default);
478 478
479 dns_client_enabled_.Init(prefs::kBuiltInDnsClientEnabled, 479 dns_client_enabled_.Init(prefs::kBuiltInDnsClientEnabled,
480 local_state, 480 local_state,
481 base::Bind(&IOThread::UpdateDnsClientEnabled, 481 base::Bind(&IOThread::UpdateDnsClientEnabled,
482 base::Unretained(this))); 482 base::Unretained(this)));
483 dns_client_enabled_.MoveToThread( 483 dns_client_enabled_.UseAlternateTaskRunner(
484 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 484 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
485 485
486 quick_check_enabled_.Init(prefs::kQuickCheckEnabled, 486 quick_check_enabled_.Init(prefs::kQuickCheckEnabled,
487 local_state); 487 local_state);
488 quick_check_enabled_.MoveToThread( 488 quick_check_enabled_.UseAlternateTaskRunner(
489 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 489 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
490 490
491 #if defined(ENABLE_CONFIGURATION_POLICY) 491 #if defined(ENABLE_CONFIGURATION_POLICY)
492 is_spdy_disabled_by_policy_ = policy_service->GetPolicies( 492 is_spdy_disabled_by_policy_ = policy_service->GetPolicies(
493 policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string())).Get( 493 policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string())).Get(
494 policy::key::kDisableSpdy) != NULL; 494 policy::key::kDisableSpdy) != NULL;
495 #endif // ENABLE_CONFIGURATION_POLICY 495 #endif // ENABLE_CONFIGURATION_POLICY
496 496
497 BrowserThread::SetDelegate(BrowserThread::IO, this); 497 BrowserThread::SetDelegate(BrowserThread::IO, this);
498 } 498 }
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1411 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1412 for (size_t i = 0; i < supported_versions.size(); ++i) { 1412 for (size_t i = 0; i < supported_versions.size(); ++i) {
1413 net::QuicVersion version = supported_versions[i]; 1413 net::QuicVersion version = supported_versions[i];
1414 if (net::QuicVersionToString(version) == quic_version) { 1414 if (net::QuicVersionToString(version) == quic_version) {
1415 return version; 1415 return version;
1416 } 1416 }
1417 } 1417 }
1418 1418
1419 return net::QUIC_VERSION_UNSUPPORTED; 1419 return net::QUIC_VERSION_UNSUPPORTED;
1420 } 1420 }
OLDNEW
« no previous file with comments | « base/threading/worker_pool.h ('k') | chrome/browser/media/media_device_id_salt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698