| 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_TEST_BASE_TESTING_PROFILE_H_ |    5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_ | 
|    6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ |    6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ | 
|    7  |    7  | 
|    8 #include <string> |    8 #include <string> | 
|    9  |    9  | 
|   10 #include "base/files/scoped_temp_dir.h" |   10 #include "base/files/scoped_temp_dir.h" | 
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  179   // Returns a testing ContextGetter (if one has been created via |  179   // Returns a testing ContextGetter (if one has been created via | 
|  180   // CreateRequestContext) or NULL. This is not done on-demand for two reasons: |  180   // CreateRequestContext) or NULL. This is not done on-demand for two reasons: | 
|  181   // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because |  181   // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because | 
|  182   // of the special memory management considerations for the |  182   // of the special memory management considerations for the | 
|  183   // TestURLRequestContextGetter class, many tests would find themseleves |  183   // TestURLRequestContextGetter class, many tests would find themseleves | 
|  184   // leaking if they called this method without the necessary IO thread. This |  184   // leaking if they called this method without the necessary IO thread. This | 
|  185   // getter is currently only capable of returning a Context that helps test |  185   // getter is currently only capable of returning a Context that helps test | 
|  186   // the CookieMonster. See implementation comments for more details. |  186   // the CookieMonster. See implementation comments for more details. | 
|  187   virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |  187   virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 
|  188   virtual net::URLRequestContextGetter* CreateRequestContext( |  188   virtual net::URLRequestContextGetter* CreateRequestContext( | 
|  189       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  189       content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; | 
|  190           blob_protocol_handler, |  | 
|  191       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  192           file_system_protocol_handler, |  | 
|  193       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  194           developer_protocol_handler, |  | 
|  195       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  196           chrome_protocol_handler, |  | 
|  197       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  198           chrome_devtools_protocol_handler) OVERRIDE; |  | 
|  199   virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |  190   virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 
|  200       int renderer_child_id) OVERRIDE; |  191       int renderer_child_id) OVERRIDE; | 
|  201   virtual content::ResourceContext* GetResourceContext() OVERRIDE; |  192   virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 
|  202   virtual content::GeolocationPermissionContext* |  193   virtual content::GeolocationPermissionContext* | 
|  203       GetGeolocationPermissionContext() OVERRIDE; |  194       GetGeolocationPermissionContext() OVERRIDE; | 
|  204   virtual content::SpeechRecognitionPreferences* |  195   virtual content::SpeechRecognitionPreferences* | 
|  205       GetSpeechRecognitionPreferences() OVERRIDE; |  196       GetSpeechRecognitionPreferences() OVERRIDE; | 
|  206   virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |  197   virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 
|  207  |  198  | 
|  208   virtual TestingProfile* AsTestingProfile() OVERRIDE; |  199   virtual TestingProfile* AsTestingProfile() OVERRIDE; | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  244       int renderer_child_id) OVERRIDE; |  235       int renderer_child_id) OVERRIDE; | 
|  245   virtual net::URLRequestContextGetter* |  236   virtual net::URLRequestContextGetter* | 
|  246       GetRequestContextForExtensions() OVERRIDE; |  237       GetRequestContextForExtensions() OVERRIDE; | 
|  247   virtual net::URLRequestContextGetter* |  238   virtual net::URLRequestContextGetter* | 
|  248       GetMediaRequestContextForStoragePartition( |  239       GetMediaRequestContextForStoragePartition( | 
|  249           const base::FilePath& partition_path, |  240           const base::FilePath& partition_path, | 
|  250           bool in_memory) OVERRIDE; |  241           bool in_memory) OVERRIDE; | 
|  251   virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |  242   virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 
|  252       const base::FilePath& partition_path, |  243       const base::FilePath& partition_path, | 
|  253       bool in_memory, |  244       bool in_memory, | 
|  254       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  245       content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; | 
|  255           blob_protocol_handler, |  | 
|  256       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  257           file_system_protocol_handler, |  | 
|  258       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  259           developer_protocol_handler, |  | 
|  260       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  261           chrome_protocol_handler, |  | 
|  262       scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  263           chrome_devtools_protocol_handler) OVERRIDE; |  | 
|  264   virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; |  246   virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; | 
|  265   virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; |  247   virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; | 
|  266   virtual std::wstring GetName(); |  248   virtual std::wstring GetName(); | 
|  267   virtual void SetName(const std::wstring& name) {} |  249   virtual void SetName(const std::wstring& name) {} | 
|  268   virtual std::wstring GetID(); |  250   virtual std::wstring GetID(); | 
|  269   virtual void SetID(const std::wstring& id); |  251   virtual void SetID(const std::wstring& id); | 
|  270   void set_last_session_exited_cleanly(bool value) { |  252   void set_last_session_exited_cleanly(bool value) { | 
|  271     last_session_exited_cleanly_ = value; |  253     last_session_exited_cleanly_ = value; | 
|  272   } |  254   } | 
|  273   virtual void MergeResourceString(int message_id, |  255   virtual void MergeResourceString(int message_id, | 
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  370   // testing. |  352   // testing. | 
|  371   ProfileDependencyManager* profile_dependency_manager_; |  353   ProfileDependencyManager* profile_dependency_manager_; | 
|  372  |  354  | 
|  373   scoped_ptr<content::MockResourceContext> resource_context_; |  355   scoped_ptr<content::MockResourceContext> resource_context_; | 
|  374  |  356  | 
|  375   // Weak pointer to a delegate for indicating that a profile was created. |  357   // Weak pointer to a delegate for indicating that a profile was created. | 
|  376   Delegate* delegate_; |  358   Delegate* delegate_; | 
|  377 }; |  359 }; | 
|  378  |  360  | 
|  379 #endif  // CHROME_TEST_BASE_TESTING_PROFILE_H_ |  361 #endif  // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 
| OLD | NEW |