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

Side by Side Diff: chrome/browser/profiles/profile_io_data.h

Issue 182993003: Add the ability for DevTools to wrap network transactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/prefs/pref_member.h" 16 #include "base/prefs/pref_member.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 18 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
19 #include "chrome/browser/io_thread.h" 19 #include "chrome/browser/io_thread.h"
20 #include "chrome/browser/net/chrome_url_request_context.h" 20 #include "chrome/browser/net/chrome_url_request_context.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/profiles/storage_partition_descriptor.h" 22 #include "chrome/browser/profiles/storage_partition_descriptor.h"
23 #include "chrome/common/content_settings_types.h" 23 #include "chrome/common/content_settings_types.h"
24 #include "content/public/browser/content_browser_client.h" 24 #include "content/public/browser/content_browser_client.h"
25 #include "content/public/browser/resource_context.h" 25 #include "content/public/browser/resource_context.h"
26 #include "net/cookies/cookie_monster.h" 26 #include "net/cookies/cookie_monster.h"
27 #include "net/http/http_cache.h"
27 #include "net/http/http_network_session.h" 28 #include "net/http/http_network_session.h"
28 #include "net/url_request/url_request_job_factory.h" 29 #include "net/url_request/url_request_job_factory.h"
29 30
30 class ChromeHttpUserAgentSettings; 31 class ChromeHttpUserAgentSettings;
31 class ChromeNetworkDelegate; 32 class ChromeNetworkDelegate;
32 class CookieSettings; 33 class CookieSettings;
34 class DevToolsNetworkController;
33 class HostContentSettingsMap; 35 class HostContentSettingsMap;
34 class ManagedModeURLFilter; 36 class ManagedModeURLFilter;
35 class MediaDeviceIDSalt; 37 class MediaDeviceIDSalt;
36 class ProtocolHandlerRegistry; 38 class ProtocolHandlerRegistry;
37 class SigninNamesOnIOThread; 39 class SigninNamesOnIOThread;
38 40
39 namespace extensions { 41 namespace extensions {
40 class InfoMap; 42 class InfoMap;
41 } 43 }
42 44
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 BooleanPrefMember* signin_allowed() const { 179 BooleanPrefMember* signin_allowed() const {
178 return &signin_allowed_; 180 return &signin_allowed_;
179 } 181 }
180 182
181 BooleanPrefMember* network_prediction_enabled() const { 183 BooleanPrefMember* network_prediction_enabled() const {
182 return &network_prediction_enabled_; 184 return &network_prediction_enabled_;
183 } 185 }
184 186
185 content::ResourceContext::SaltCallback GetMediaDeviceIDSalt() const; 187 content::ResourceContext::SaltCallback GetMediaDeviceIDSalt() const;
186 188
189 DevToolsNetworkController* network_controller() const {
190 return network_controller_.get();
191 }
192
187 net::TransportSecurityState* transport_security_state() const { 193 net::TransportSecurityState* transport_security_state() const {
188 return transport_security_state_.get(); 194 return transport_security_state_.get();
189 } 195 }
190 196
191 #if defined(OS_CHROMEOS) 197 #if defined(OS_CHROMEOS)
192 std::string username_hash() const { 198 std::string username_hash() const {
193 return username_hash_; 199 return username_hash_;
194 } 200 }
195 #endif 201 #endif
196 202
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 361
356 bool initialized() const { 362 bool initialized() const {
357 return initialized_; 363 return initialized_;
358 } 364 }
359 365
360 // Destroys the ResourceContext first, to cancel any URLRequests that are 366 // Destroys the ResourceContext first, to cancel any URLRequests that are
361 // using it still, before we destroy the member variables that those 367 // using it still, before we destroy the member variables that those
362 // URLRequests may be accessing. 368 // URLRequests may be accessing.
363 void DestroyResourceContext(); 369 void DestroyResourceContext();
364 370
365 // Fills in fields of params using values from main_request_context_ and the 371 // Creates network session and main network transaction factory.
366 // IOThread associated with profile_params. 372 scoped_ptr<net::HttpCache> CreateMainHttpFactory(
367 void PopulateNetworkSessionParams(
368 const ProfileParams* profile_params, 373 const ProfileParams* profile_params,
369 net::HttpNetworkSession::Params* params) const; 374 net::HttpCache::BackendFactory* main_backend) const;
375
376 // Creates network transaction factory.
377 scoped_ptr<net::HttpCache> CreateHttpFactory(
378 net::HttpNetworkSession* shared_session,
379 net::HttpCache::BackendFactory* backend) const;
370 380
371 void SetCookieSettingsForTesting(CookieSettings* cookie_settings); 381 void SetCookieSettingsForTesting(CookieSettings* cookie_settings);
372 382
373 void set_signin_names_for_testing(SigninNamesOnIOThread* signin_names); 383 void set_signin_names_for_testing(SigninNamesOnIOThread* signin_names);
374 384
375 private: 385 private:
376 class ResourceContext : public content::ResourceContext { 386 class ResourceContext : public content::ResourceContext {
377 public: 387 public:
378 explicit ResourceContext(ProfileIOData* io_data); 388 explicit ResourceContext(ProfileIOData* io_data);
379 virtual ~ResourceContext(); 389 virtual ~ResourceContext();
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 570
561 mutable scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 571 mutable scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
562 572
563 mutable scoped_ptr<ChromeHttpUserAgentSettings> 573 mutable scoped_ptr<ChromeHttpUserAgentSettings>
564 chrome_http_user_agent_settings_; 574 chrome_http_user_agent_settings_;
565 575
566 #if defined(ENABLE_MANAGED_USERS) 576 #if defined(ENABLE_MANAGED_USERS)
567 mutable scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter_; 577 mutable scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter_;
568 #endif 578 #endif
569 579
580 mutable scoped_ptr<DevToolsNetworkController> network_controller_;
581
570 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 582 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
571 bool initialized_on_UI_thread_; 583 bool initialized_on_UI_thread_;
572 584
573 const Profile::ProfileType profile_type_; 585 const Profile::ProfileType profile_type_;
574 586
575 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 587 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
576 }; 588 };
577 589
578 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 590 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698