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

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

Issue 11959029: Make the v8 Isolate used in the proxy resolver explicit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 10 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 | « no previous file | net/base/run_all_unittests.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/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "net/websockets/websocket_job.h" 63 #include "net/websockets/websocket_job.h"
64 64
65 #if defined(ENABLE_CONFIGURATION_POLICY) 65 #if defined(ENABLE_CONFIGURATION_POLICY)
66 #include "policy/policy_constants.h" 66 #include "policy/policy_constants.h"
67 #endif 67 #endif
68 68
69 #if defined(USE_NSS) || defined(OS_IOS) 69 #if defined(USE_NSS) || defined(OS_IOS)
70 #include "net/ocsp/nss_ocsp.h" 70 #include "net/ocsp/nss_ocsp.h"
71 #endif 71 #endif
72 72
73 #if !defined(OS_IOS)
74 #include "net/proxy/proxy_resolver_v8.h"
75 #endif
76
73 #if defined(OS_CHROMEOS) 77 #if defined(OS_CHROMEOS)
74 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 78 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
75 #endif // defined(OS_CHROMEOS) 79 #endif // defined(OS_CHROMEOS)
76 80
77 using content::BrowserThread; 81 using content::BrowserThread;
78 82
79 class SafeBrowsingURLRequestContext; 83 class SafeBrowsingURLRequestContext;
80 84
81 // The IOThread object must outlive any tasks posted to the IO thread before the 85 // The IOThread object must outlive any tasks posted to the IO thread before the
82 // Quit task, so base::Bind() calls are not refcounted. 86 // Quit task, so base::Bind() calls are not refcounted.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 PrefServiceSimple* local_state, 366 PrefServiceSimple* local_state,
363 policy::PolicyService* policy_service, 367 policy::PolicyService* policy_service,
364 ChromeNetLog* net_log, 368 ChromeNetLog* net_log,
365 extensions::EventRouterForwarder* extension_event_router_forwarder) 369 extensions::EventRouterForwarder* extension_event_router_forwarder)
366 : net_log_(net_log), 370 : net_log_(net_log),
367 extension_event_router_forwarder_(extension_event_router_forwarder), 371 extension_event_router_forwarder_(extension_event_router_forwarder),
368 globals_(NULL), 372 globals_(NULL),
369 sdch_manager_(NULL), 373 sdch_manager_(NULL),
370 is_spdy_disabled_by_policy_(false), 374 is_spdy_disabled_by_policy_(false),
371 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 375 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
376 #if !defined(OS_IOS)
377 net::ProxyResolverV8::RememberDefaultIsolate();
John Knottenbelt 2013/02/01 15:39:33 On downstream Chrome on Android, this function ass
Sven Panne 2013/02/01 15:52:28 RememberDefaultIsolate() has to be called exactly
378 #endif
372 // We call RegisterPrefs() here (instead of inside browser_prefs.cc) to make 379 // We call RegisterPrefs() here (instead of inside browser_prefs.cc) to make
373 // sure that everything is initialized in the right order. 380 // sure that everything is initialized in the right order.
374 // 381 //
375 // TODO(joi): See if we can fix so it does get registered from 382 // TODO(joi): See if we can fix so it does get registered from
376 // browser_prefs::RegisterLocalState. 383 // browser_prefs::RegisterLocalState.
377 RegisterPrefs(local_state); 384 RegisterPrefs(local_state);
378 auth_schemes_ = local_state->GetString(prefs::kAuthSchemes); 385 auth_schemes_ = local_state->GetString(prefs::kAuthSchemes);
379 negotiate_disable_cname_lookup_ = local_state->GetBoolean( 386 negotiate_disable_cname_lookup_ = local_state->GetBoolean(
380 prefs::kDisableAuthNegotiateCnameLookup); 387 prefs::kDisableAuthNegotiateCnameLookup);
381 negotiate_enable_port_ = local_state->GetBoolean( 388 negotiate_enable_port_ = local_state->GetBoolean(
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 globals_->system_request_context.reset( 909 globals_->system_request_context.reset(
903 ConstructSystemRequestContext(globals_, net_log_)); 910 ConstructSystemRequestContext(globals_, net_log_));
904 911
905 sdch_manager_->set_sdch_fetcher( 912 sdch_manager_->set_sdch_fetcher(
906 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); 913 new SdchDictionaryFetcher(system_url_request_context_getter_.get()));
907 } 914 }
908 915
909 void IOThread::UpdateDnsClientEnabled() { 916 void IOThread::UpdateDnsClientEnabled() {
910 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); 917 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_);
911 } 918 }
OLDNEW
« no previous file with comments | « no previous file | net/base/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698