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