| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 class TestExtensionURLRequestContext : public net::URLRequestContext { | 99 class TestExtensionURLRequestContext : public net::URLRequestContext { |
| 100 public: | 100 public: |
| 101 TestExtensionURLRequestContext() { | 101 TestExtensionURLRequestContext() { |
| 102 net::CookieMonster* cookie_monster = new net::CookieMonster(NULL, NULL); | 102 net::CookieMonster* cookie_monster = new net::CookieMonster(NULL, NULL); |
| 103 const char* schemes[] = {chrome::kExtensionScheme}; | 103 const char* schemes[] = {chrome::kExtensionScheme}; |
| 104 cookie_monster->SetCookieableSchemes(schemes, 1); | 104 cookie_monster->SetCookieableSchemes(schemes, 1); |
| 105 set_cookie_store(cookie_monster); | 105 set_cookie_store(cookie_monster); |
| 106 } | 106 } |
| 107 |
| 108 private: |
| 109 virtual ~TestExtensionURLRequestContext() {} |
| 107 }; | 110 }; |
| 108 | 111 |
| 109 class TestExtensionURLRequestContextGetter | 112 class TestExtensionURLRequestContextGetter |
| 110 : public net::URLRequestContextGetter { | 113 : public net::URLRequestContextGetter { |
| 111 public: | 114 public: |
| 112 virtual net::URLRequestContext* GetURLRequestContext() { | 115 virtual net::URLRequestContext* GetURLRequestContext() { |
| 113 if (!context_) | 116 if (!context_) |
| 114 context_ = new TestExtensionURLRequestContext(); | 117 context_ = new TestExtensionURLRequestContext(); |
| 115 return context_.get(); | 118 return context_.get(); |
| 116 } | 119 } |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 void TestingProfile::DestroyWebDataService() { | 719 void TestingProfile::DestroyWebDataService() { |
| 717 if (!web_data_service_.get()) | 720 if (!web_data_service_.get()) |
| 718 return; | 721 return; |
| 719 | 722 |
| 720 web_data_service_->Shutdown(); | 723 web_data_service_->Shutdown(); |
| 721 } | 724 } |
| 722 | 725 |
| 723 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { | 726 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { |
| 724 return true; | 727 return true; |
| 725 } | 728 } |
| OLD | NEW |