| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST
_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST
_H_ |
| 6 #define CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST
_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST
_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "chrome/browser/component_updater/component_updater_service.h" | 19 #include "chrome/browser/component_updater/component_updater_service.h" |
| 20 #include "chrome/browser/component_updater/test/component_patcher_mock.h" | 20 #include "chrome/browser/component_updater/test/component_patcher_mock.h" |
| 21 #include "chrome/browser/component_updater/test/url_request_post_interceptor.h" | 21 #include "chrome/browser/component_updater/test/url_request_post_interceptor.h" |
| 22 #include "content/public/test/test_browser_thread_bundle.h" | 22 #include "content/public/test/test_browser_thread_bundle.h" |
| 23 #include "content/test/net/url_request_prepackaged_interceptor.h" | 23 #include "content/test/net/url_request_prepackaged_interceptor.h" |
| 24 #include "net/url_request/url_request_test_util.h" | 24 #include "net/url_request/url_request_test_util.h" |
| 25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 | 27 |
| 28 namespace component_updater { |
| 29 |
| 28 class TestInstaller; | 30 class TestInstaller; |
| 29 | 31 |
| 30 namespace component_updater { | |
| 31 | |
| 32 // Intercepts HTTP GET requests sent to "localhost". | 32 // Intercepts HTTP GET requests sent to "localhost". |
| 33 typedef content::URLLocalHostRequestPrepackagedInterceptor GetInterceptor; | 33 typedef content::URLLocalHostRequestPrepackagedInterceptor GetInterceptor; |
| 34 | 34 |
| 35 // Intercepts HTTP POST requests sent to "localhost2". | 35 // Intercepts HTTP POST requests sent to "localhost2". |
| 36 class InterceptorFactory : public URLRequestPostInterceptorFactory { | 36 class InterceptorFactory : public URLRequestPostInterceptorFactory { |
| 37 public: | 37 public: |
| 38 InterceptorFactory(); | 38 InterceptorFactory(); |
| 39 ~InterceptorFactory(); | 39 ~InterceptorFactory(); |
| 40 | 40 |
| 41 URLRequestPostInterceptor* CreateInterceptor(); | 41 URLRequestPostInterceptor* CreateInterceptor(); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 class OnDemandTester { | 170 class OnDemandTester { |
| 171 public: | 171 public: |
| 172 static ComponentUpdateService::Status OnDemand( | 172 static ComponentUpdateService::Status OnDemand( |
| 173 ComponentUpdateService* cus, const std::string& component_id); | 173 ComponentUpdateService* cus, const std::string& component_id); |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 } // namespace component_updater | 176 } // namespace component_updater |
| 177 | 177 |
| 178 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT
EST_H_ | 178 #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITT
EST_H_ |
| OLD | NEW |