| Index: chrome/browser/component_updater/test/component_updater_service_unittest.h
|
| diff --git a/chrome/browser/component_updater/test/component_updater_service_unittest.h b/chrome/browser/component_updater/test/component_updater_service_unittest.h
|
| index ba98102137d871c08448c68634ec7dc664b4ac03..a4f93471cce48bc57e22677d3e0fe97cca8a3394 100644
|
| --- a/chrome/browser/component_updater/test/component_updater_service_unittest.h
|
| +++ b/chrome/browser/component_updater/test/component_updater_service_unittest.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "chrome/browser/component_updater/component_updater_service.h"
|
| #include "chrome/browser/component_updater/test/component_patcher_mock.h"
|
| +#include "chrome/browser/component_updater/test/url_request_post_interceptor.h"
|
| #include "content/public/test/test_notification_tracker.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| @@ -59,6 +60,8 @@ class TestConfigurator : public ComponentUpdateService::Configurator {
|
|
|
| virtual GURL UpdateUrl() OVERRIDE;
|
|
|
| + virtual GURL PingUrl() OVERRIDE;
|
| +
|
| virtual const char* ExtraRequestParams() OVERRIDE;
|
|
|
| virtual size_t UrlSizeLimit() OVERRIDE;
|
| @@ -68,8 +71,6 @@ class TestConfigurator : public ComponentUpdateService::Configurator {
|
| // Don't use the utility process to decode files.
|
| virtual bool InProcess() OVERRIDE;
|
|
|
| - virtual void OnEvent(Events event, int extra) OVERRIDE;
|
| -
|
| virtual ComponentPatcher* CreateComponentPatcher() OVERRIDE;
|
|
|
| virtual bool DeltasEnabled() const OVERRIDE;
|
| @@ -131,4 +132,26 @@ class ComponentUpdaterTest : public testing::Test {
|
| const char expected_crx_url[] =
|
| "http://localhost/download/jebgalgnebhfojomionfpkfelancnnkf.crx";
|
|
|
| +class PingChecker : public RequestCounter {
|
| + public:
|
| + explicit PingChecker(const std::map<std::string, std::string>& attributes);
|
| +
|
| + virtual ~PingChecker();
|
| +
|
| + virtual void Trial(net::URLRequest* request) OVERRIDE;
|
| +
|
| + int NumHits() const {
|
| + return num_hits_;
|
| + }
|
| + int NumMisses() const {
|
| + return num_misses_;
|
| + }
|
| +
|
| + private:
|
| + int num_hits_;
|
| + int num_misses_;
|
| + const std::map<std::string, std::string> attributes_;
|
| + virtual bool Test(net::URLRequest* request);
|
| +};
|
| +
|
| #endif // CHROME_BROWSER_COMPONENT_UPDATER_TEST_COMPONENT_UPDATER_SERVICE_UNITTEST_H_
|
|
|