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

Side by Side Diff: chrome/browser/net/chrome_url_request_context.h

Issue 3304015: Use PrefChangeRegistrar everywhere (Closed)
Patch Set: final version for commit Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/linked_ptr.h" 14 #include "base/linked_ptr.h"
15 #include "chrome/browser/appcache/chrome_appcache_service.h" 15 #include "chrome/browser/appcache/chrome_appcache_service.h"
16 #include "chrome/browser/chrome_blob_storage_context.h" 16 #include "chrome/browser/chrome_blob_storage_context.h"
17 #include "chrome/browser/file_system/file_system_host_context.h" 17 #include "chrome/browser/file_system/file_system_host_context.h"
18 #include "chrome/browser/host_content_settings_map.h" 18 #include "chrome/browser/host_content_settings_map.h"
19 #include "chrome/browser/host_zoom_map.h" 19 #include "chrome/browser/host_zoom_map.h"
20 #include "chrome/browser/io_thread.h" 20 #include "chrome/browser/io_thread.h"
21 #include "chrome/browser/net/chrome_cookie_policy.h" 21 #include "chrome/browser/net/chrome_cookie_policy.h"
22 #include "chrome/browser/prefs/pref_change_registrar.h"
22 #include "chrome/browser/prefs/pref_service.h" 23 #include "chrome/browser/prefs/pref_service.h"
23 #include "chrome/common/extensions/extension.h" 24 #include "chrome/common/extensions/extension.h"
24 #include "chrome/common/extensions/extension_icon_set.h" 25 #include "chrome/common/extensions/extension_icon_set.h"
25 #include "chrome/common/net/url_request_context_getter.h" 26 #include "chrome/common/net/url_request_context_getter.h"
26 #include "chrome/common/notification_registrar.h" 27 #include "chrome/common/notification_registrar.h"
27 #include "net/base/cookie_monster.h" 28 #include "net/base/cookie_monster.h"
28 #include "net/base/cookie_policy.h" 29 #include "net/base/cookie_policy.h"
29 #include "net/url_request/url_request_context.h" 30 #include "net/url_request/url_request_context.h"
30 #include "webkit/database/database_tracker.h" 31 #include "webkit/database/database_tracker.h"
31 32
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 376
376 // These methods simply forward to the corresponding method on 377 // These methods simply forward to the corresponding method on
377 // ChromeURLRequestContext. 378 // ChromeURLRequestContext.
378 void OnAcceptLanguageChange(const std::string& accept_language); 379 void OnAcceptLanguageChange(const std::string& accept_language);
379 void OnDefaultCharsetChange(const std::string& default_charset); 380 void OnDefaultCharsetChange(const std::string& default_charset);
380 381
381 // Saves the cookie store to |result| and signals |completion|. 382 // Saves the cookie store to |result| and signals |completion|.
382 void GetCookieStoreAsyncHelper(base::WaitableEvent* completion, 383 void GetCookieStoreAsyncHelper(base::WaitableEvent* completion,
383 net::CookieStore** result); 384 net::CookieStore** result);
384 385
385 // Access only from the UI thread. 386 PrefChangeRegistrar registrar_;
386 PrefService* prefs_;
387 387
388 // Deferred logic for creating a ChromeURLRequestContext. 388 // Deferred logic for creating a ChromeURLRequestContext.
389 // Access only from the IO thread. 389 // Access only from the IO thread.
390 scoped_ptr<ChromeURLRequestContextFactory> factory_; 390 scoped_ptr<ChromeURLRequestContextFactory> factory_;
391 391
392 // NULL if not yet initialized. Otherwise, it is the URLRequestContext 392 // NULL if not yet initialized. Otherwise, it is the URLRequestContext
393 // instance that was lazilly created by GetURLRequestContext. 393 // instance that was lazilly created by GetURLRequestContext.
394 // Access only from the IO thread. 394 // Access only from the IO thread.
395 scoped_refptr<URLRequestContext> url_request_context_; 395 scoped_refptr<URLRequestContext> url_request_context_;
396 396
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); 451 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory);
452 }; 452 };
453 453
454 // Creates a proxy configuration from proxy-related preferences fetched 454 // Creates a proxy configuration from proxy-related preferences fetched
455 // from |pref_service|. The relevant preferences in |pref_service| are 455 // from |pref_service|. The relevant preferences in |pref_service| are
456 // initialized from the process' command line or by applicable proxy policies. 456 // initialized from the process' command line or by applicable proxy policies.
457 net::ProxyConfig* CreateProxyConfig(const PrefService* pref_service); 457 net::ProxyConfig* CreateProxyConfig(const PrefService* pref_service);
458 458
459 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 459 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/host_zoom_map_unittest.cc ('k') | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698