| 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/memory/ref_counted.h" |   10 #include "base/memory/ref_counted.h" | 
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   98   // Creates the BookmkarBarModel. If not invoked the bookmark bar model is |   98   // Creates the BookmkarBarModel. If not invoked the bookmark bar model is | 
|   99   // NULL. If |delete_file| is true, the bookmarks file is deleted first, then |   99   // NULL. If |delete_file| is true, the bookmarks file is deleted first, then | 
|  100   // the model is created. As TestingProfile deletes the directory containing |  100   // the model is created. As TestingProfile deletes the directory containing | 
|  101   // the files used by HistoryService, the boolean only matters if you're |  101   // the files used by HistoryService, the boolean only matters if you're | 
|  102   // recreating the BookmarkModel. |  102   // recreating the BookmarkModel. | 
|  103   // |  103   // | 
|  104   // NOTE: this does not block until the bookmarks are loaded. For that use |  104   // NOTE: this does not block until the bookmarks are loaded. For that use | 
|  105   // BlockUntilBookmarkModelLoaded. |  105   // BlockUntilBookmarkModelLoaded. | 
|  106   void CreateBookmarkModel(bool delete_file); |  106   void CreateBookmarkModel(bool delete_file); | 
|  107  |  107  | 
|  108   // Creates a ProtocolHandlerRegistry. If not invoked the protocol handler |  | 
|  109   // registry is NULL. |  | 
|  110   void CreateProtocolHandlerRegistry(); |  | 
|  111  |  | 
|  112   // Creates a ProtocolHandlerRegistry with the provided delegate. |  | 
|  113   void CreateProtocolHandlerRegistry( |  | 
|  114       ProtocolHandlerRegistry::Delegate* delegate); |  | 
|  115  |  | 
|  116   // Creates a WebDataService. If not invoked, the web data service is NULL. |  108   // Creates a WebDataService. If not invoked, the web data service is NULL. | 
|  117   void CreateWebDataService(); |  109   void CreateWebDataService(); | 
|  118  |  110  | 
|  119   // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from |  111   // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from | 
|  120   // CreateBookmarkModel. |  112   // CreateBookmarkModel. | 
|  121   void BlockUntilBookmarkModelLoaded(); |  113   void BlockUntilBookmarkModelLoaded(); | 
|  122  |  114  | 
|  123   // Blocks until TopSites finishes loading. |  115   // Blocks until TopSites finishes loading. | 
|  124   void BlockUntilTopSitesLoaded(); |  116   void BlockUntilTopSitesLoaded(); | 
|  125  |  117  | 
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  207   virtual void MergeResourceString(int message_id, |  199   virtual void MergeResourceString(int message_id, | 
|  208                                    std::wstring* output_string) {} |  200                                    std::wstring* output_string) {} | 
|  209   virtual void MergeResourceInteger(int message_id, int* output_value) {} |  201   virtual void MergeResourceInteger(int message_id, int* output_value) {} | 
|  210   virtual void MergeResourceBoolean(int message_id, bool* output_value) {} |  202   virtual void MergeResourceBoolean(int message_id, bool* output_value) {} | 
|  211   virtual BookmarkModel* GetBookmarkModel() OVERRIDE; |  203   virtual BookmarkModel* GetBookmarkModel() OVERRIDE; | 
|  212   virtual bool IsSameProfile(Profile *p) OVERRIDE; |  204   virtual bool IsSameProfile(Profile *p) OVERRIDE; | 
|  213   virtual base::Time GetStartTime() const OVERRIDE; |  205   virtual base::Time GetStartTime() const OVERRIDE; | 
|  214   virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; |  206   virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; | 
|  215   virtual void MarkAsCleanShutdown() OVERRIDE {} |  207   virtual void MarkAsCleanShutdown() OVERRIDE {} | 
|  216   virtual void InitPromoResources() OVERRIDE {} |  208   virtual void InitPromoResources() OVERRIDE {} | 
|  217   virtual void InitRegisteredProtocolHandlers() OVERRIDE {} |  | 
|  218  |  209  | 
|  219   virtual FilePath last_selected_directory() OVERRIDE; |  210   virtual FilePath last_selected_directory() OVERRIDE; | 
|  220   virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; |  211   virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; | 
|  221   virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE; |  212   virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE; | 
|  222 #if defined(OS_CHROMEOS) |  213 #if defined(OS_CHROMEOS) | 
|  223   virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE { |  214   virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE { | 
|  224   } |  215   } | 
|  225   virtual void InitChromeOSPreferences() OVERRIDE { |  216   virtual void InitChromeOSPreferences() OVERRIDE { | 
|  226   } |  217   } | 
|  227   virtual void ChangeAppLocale(const std::string&, |  218   virtual void ChangeAppLocale(const std::string&, | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  262  |  253  | 
|  263   // Creates a TestingPrefService and associates it with the TestingProfile. |  254   // Creates a TestingPrefService and associates it with the TestingProfile. | 
|  264   void CreateTestingPrefService(); |  255   void CreateTestingPrefService(); | 
|  265  |  256  | 
|  266   virtual base::Callback<ChromeURLDataManagerBackend*(void)> |  257   virtual base::Callback<ChromeURLDataManagerBackend*(void)> | 
|  267       GetChromeURLDataManagerBackendGetter() const OVERRIDE; |  258       GetChromeURLDataManagerBackendGetter() const OVERRIDE; | 
|  268  |  259  | 
|  269   // The favicon service. Only created if CreateFaviconService is invoked. |  260   // The favicon service. Only created if CreateFaviconService is invoked. | 
|  270   scoped_ptr<FaviconService> favicon_service_; |  261   scoped_ptr<FaviconService> favicon_service_; | 
|  271  |  262  | 
|  272   // The ProtocolHandlerRegistry. Only created if CreateProtocolHandlerRegistry |  | 
|  273   // is invoked. |  | 
|  274   scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; |  | 
|  275  |  | 
|  276   // The policy service. Lazily created as a stub. |  263   // The policy service. Lazily created as a stub. | 
|  277   scoped_ptr<policy::PolicyService> policy_service_; |  264   scoped_ptr<policy::PolicyService> policy_service_; | 
|  278  |  265  | 
|  279   // Internally, this is a TestURLRequestContextGetter that creates a dummy |  266   // Internally, this is a TestURLRequestContextGetter that creates a dummy | 
|  280   // request context. Currently, only the CookieMonster is hooked up. |  267   // request context. Currently, only the CookieMonster is hooked up. | 
|  281   scoped_refptr<net::URLRequestContextGetter> request_context_; |  268   scoped_refptr<net::URLRequestContextGetter> request_context_; | 
|  282   scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; |  269   scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; | 
|  283  |  270  | 
|  284   std::wstring id_; |  271   std::wstring id_; | 
|  285  |  272  | 
| (...skipping 29 matching lines...) Expand all  Loading... | 
|  315   // testing. |  302   // testing. | 
|  316   ProfileDependencyManager* profile_dependency_manager_; |  303   ProfileDependencyManager* profile_dependency_manager_; | 
|  317  |  304  | 
|  318   scoped_ptr<content::MockResourceContext> resource_context_; |  305   scoped_ptr<content::MockResourceContext> resource_context_; | 
|  319  |  306  | 
|  320   // Weak pointer to a delegate for indicating that a profile was created. |  307   // Weak pointer to a delegate for indicating that a profile was created. | 
|  321   Delegate* delegate_; |  308   Delegate* delegate_; | 
|  322 }; |  309 }; | 
|  323  |  310  | 
|  324 #endif  // CHROME_TEST_BASE_TESTING_PROFILE_H_ |  311 #endif  // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 
| OLD | NEW |