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 #include "chrome/test/base/testing_profile.h" | 5 #include "chrome/test/base/testing_profile.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 public: | 112 public: |
113 virtual net::URLRequestContext* GetURLRequestContext() { | 113 virtual net::URLRequestContext* GetURLRequestContext() { |
114 if (!context_) | 114 if (!context_) |
115 context_ = new TestExtensionURLRequestContext(); | 115 context_ = new TestExtensionURLRequestContext(); |
116 return context_.get(); | 116 return context_.get(); |
117 } | 117 } |
118 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { | 118 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const { |
119 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 119 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
120 } | 120 } |
121 | 121 |
| 122 protected: |
| 123 virtual ~TestExtensionURLRequestContextGetter() {} |
| 124 |
122 private: | 125 private: |
123 scoped_refptr<net::URLRequestContext> context_; | 126 scoped_refptr<net::URLRequestContext> context_; |
124 }; | 127 }; |
125 | 128 |
126 ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) { | 129 ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) { |
127 return new DesktopNotificationService(profile, NULL); | 130 return new DesktopNotificationService(profile, NULL); |
128 } | 131 } |
129 | 132 |
130 } // namespace | 133 } // namespace |
131 | 134 |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 void TestingProfile::DestroyWebDataService() { | 725 void TestingProfile::DestroyWebDataService() { |
723 if (!web_data_service_.get()) | 726 if (!web_data_service_.get()) |
724 return; | 727 return; |
725 | 728 |
726 web_data_service_->Shutdown(); | 729 web_data_service_->Shutdown(); |
727 } | 730 } |
728 | 731 |
729 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { | 732 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { |
730 return true; | 733 return true; |
731 } | 734 } |
OLD | NEW |