Chromium Code Reviews| Index: chrome/browser/component_updater/component_updater_interceptor.h |
| diff --git a/chrome/browser/component_updater/component_updater_interceptor.h b/chrome/browser/component_updater/component_updater_interceptor.h |
| deleted file mode 100644 |
| index 67b91992782e6639d4ef41054635f55260f4f7c6..0000000000000000000000000000000000000000 |
| --- a/chrome/browser/component_updater/component_updater_interceptor.h |
| +++ /dev/null |
| @@ -1,60 +0,0 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| -// Use of this source code is governed by a BSD-style license that can be |
| -// found in the LICENSE file. |
|
mmenke
2012/12/11 17:22:38
Hmm...This file is labelled "M" rather than "D".
mmenke
2012/12/11 19:18:25
Clarification: In the list of changed files, it's
pauljensen
2012/12/11 21:22:55
Ya I've noticed this. "git cl patch 11293252" del
|
| - |
| -#ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_INTERCEPTOR_H_ |
| -#define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_INTERCEPTOR_H_ |
| - |
| -#include <map> |
| -#include <string> |
| - |
| -#include "base/compiler_specific.h" |
| -#include "base/file_path.h" |
| -#include "googleurl/src/gurl.h" |
| -#include "net/url_request/url_request.h" |
| - |
| -#if !defined(UNIT_TEST) |
| -#error "use this class only in unit tests" |
| -#endif |
| - |
| -// This url request interceptor lets us respond to localhost http request urls |
| -// with the contents of files on disk for use in tests. |
| -class ComponentUpdateInterceptor |
| - : public net::URLRequest::Interceptor, |
| - public base::RefCountedThreadSafe<ComponentUpdateInterceptor> { |
| - public: |
| - ComponentUpdateInterceptor(); |
| - |
| - // When requests for |url| arrive, respond with the contents of |path|. The |
| - // hostname of |url| must be "localhost" to avoid DNS lookups, and the scheme |
| - // must be "http". |
| - void SetResponse(const std::string& url, |
| - const std::string& headers, |
| - const FilePath& path); |
| - |
| - // Returns how many requests have been issued that have a stored reply. |
| - int hit_count() const { return hit_count_; } |
| - |
| - private: |
| - // When computing matches, this ignores the query parameters of the url. |
| - virtual net::URLRequestJob* MaybeIntercept( |
| - net::URLRequest* request, |
| - net::NetworkDelegate* network_delegate) OVERRIDE; |
| - |
| - friend class base::RefCountedThreadSafe<ComponentUpdateInterceptor>; |
| - |
| - virtual ~ComponentUpdateInterceptor(); |
| - |
| - struct Response { |
| - FilePath data_path; |
| - std::string headers; |
| - }; |
| - |
| - typedef std::map<GURL, Response> ResponseMap; |
| - ResponseMap responses_; |
| - int hit_count_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(ComponentUpdateInterceptor); |
| -}; |
| - |
| -#endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_INTERCEPTOR_H_ |