OLD | NEW |
---|---|
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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
413 void SetCookieSettingsForTesting(CookieSettings* cookie_settings); | 413 void SetCookieSettingsForTesting(CookieSettings* cookie_settings); |
414 | 414 |
415 void set_signin_names_for_testing(SigninNamesOnIOThread* signin_names); | 415 void set_signin_names_for_testing(SigninNamesOnIOThread* signin_names); |
416 | 416 |
417 private: | 417 private: |
418 class ResourceContext : public content::ResourceContext { | 418 class ResourceContext : public content::ResourceContext { |
419 public: | 419 public: |
420 explicit ResourceContext(ProfileIOData* io_data); | 420 explicit ResourceContext(ProfileIOData* io_data); |
421 virtual ~ResourceContext(); | 421 virtual ~ResourceContext(); |
422 | 422 |
423 void set_profile(Profile* profile); | |
tommi (sloooow) - chröme
2014/08/22 19:42:56
I'm wary of making changes to ResourceContext and
Henrik Grunell
2014/08/25 08:21:46
Maybe asking for access based on policy via Render
| |
424 | |
423 // ResourceContext implementation: | 425 // ResourceContext implementation: |
424 virtual net::HostResolver* GetHostResolver() OVERRIDE; | 426 virtual net::HostResolver* GetHostResolver() OVERRIDE; |
425 virtual net::URLRequestContext* GetRequestContext() OVERRIDE; | 427 virtual net::URLRequestContext* GetRequestContext() OVERRIDE; |
426 virtual scoped_ptr<net::ClientCertStore> CreateClientCertStore() OVERRIDE; | 428 virtual scoped_ptr<net::ClientCertStore> CreateClientCertStore() OVERRIDE; |
427 virtual void CreateKeygenHandler( | 429 virtual void CreateKeygenHandler( |
428 uint32 key_size_in_bits, | 430 uint32 key_size_in_bits, |
429 const std::string& challenge_string, | 431 const std::string& challenge_string, |
430 const GURL& url, | 432 const GURL& url, |
431 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) | 433 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) |
432 OVERRIDE; | 434 OVERRIDE; |
433 virtual bool AllowMicAccess(const GURL& origin) OVERRIDE; | 435 virtual bool AllowMicAccess(const GURL& origin) OVERRIDE; |
434 virtual bool AllowCameraAccess(const GURL& origin) OVERRIDE; | 436 virtual bool AllowCameraAccess(const GURL& origin) OVERRIDE; |
435 virtual SaltCallback GetMediaDeviceIDSalt() OVERRIDE; | 437 virtual SaltCallback GetMediaDeviceIDSalt() OVERRIDE; |
436 | 438 |
437 private: | 439 private: |
438 friend class ProfileIOData; | 440 friend class ProfileIOData; |
439 | 441 |
440 // Helper method that returns true if |type| is allowed for |origin|, false | 442 // Helper method that returns true if |type| is allowed for |origin|, false |
441 // otherwise. | 443 // otherwise. |
442 bool AllowContentAccess(const GURL& origin, ContentSettingsType type); | 444 bool AllowContentAccess(const GURL& origin, ContentSettingsType type); |
443 | 445 |
444 ProfileIOData* const io_data_; | 446 ProfileIOData* const io_data_; |
447 Profile* profile_; | |
tommi (sloooow) - chröme
2014/08/22 19:42:56
this would need a lot of documentation I think and
| |
445 | 448 |
446 net::HostResolver* host_resolver_; | 449 net::HostResolver* host_resolver_; |
447 net::URLRequestContext* request_context_; | 450 net::URLRequestContext* request_context_; |
448 }; | 451 }; |
449 | 452 |
450 typedef std::map<StoragePartitionDescriptor, | 453 typedef std::map<StoragePartitionDescriptor, |
451 net::URLRequestContext*, | 454 net::URLRequestContext*, |
452 StoragePartitionDescriptorLess> | 455 StoragePartitionDescriptorLess> |
453 URLRequestContextMap; | 456 URLRequestContextMap; |
454 | 457 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
621 | 624 |
622 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 625 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
623 bool initialized_on_UI_thread_; | 626 bool initialized_on_UI_thread_; |
624 | 627 |
625 const Profile::ProfileType profile_type_; | 628 const Profile::ProfileType profile_type_; |
626 | 629 |
627 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 630 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
628 }; | 631 }; |
629 | 632 |
630 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 633 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |