Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1571)

Unified Diff: chrome/browser/chromeos/gview_request_interceptor.h

Issue 7075005: Revert 86802 - Remove ProtocolFactory/Interceptor uses in GViewRequestInterceptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/gview_request_interceptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gview_request_interceptor.h
===================================================================
--- chrome/browser/chromeos/gview_request_interceptor.h (revision 86802)
+++ chrome/browser/chromeos/gview_request_interceptor.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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.
@@ -8,8 +8,10 @@
#include <string>
#include "base/hash_tables.h"
-#include "net/url_request/url_request_job_factory.h"
+#include "net/url_request/url_request.h"
+template <typename T> struct DefaultSingletonTraits;
+
namespace chromeos {
// This class integrates the Google Document Viewer into ChromeOS,
@@ -18,27 +20,26 @@
// document types (such as PDF) and redirect the request to the Google
// Document Viewer, including the document's original URL as a
// parameter.
-class GViewRequestInterceptor : public net::URLRequestJobFactory::Interceptor {
+class GViewRequestInterceptor : public net::URLRequest::Interceptor {
public:
- GViewRequestInterceptor();
- virtual ~GViewRequestInterceptor();
-
// Always returns NULL because we don't want to attempt a redirect
// before seeing the detected mime type of the request.
- virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request) const;
+ virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request);
- // Always returns NULL.
- virtual net::URLRequestJob* MaybeInterceptRedirect(
- const GURL& location,
- net::URLRequest* request) const;
-
// Determines if the requested document can be viewed by the Google
// Document Viewer. If it can, returns a net::URLRequestJob that
// redirects the browser to the view URL.
- virtual net::URLRequestJob* MaybeInterceptResponse(
- net::URLRequest* request) const;
+ virtual net::URLRequestJob* MaybeInterceptResponse(net::URLRequest* request);
+ // Singleton accessor.
+ static GViewRequestInterceptor* GetInstance();
+
private:
+ friend struct DefaultSingletonTraits<GViewRequestInterceptor>;
+
+ GViewRequestInterceptor();
+ virtual ~GViewRequestInterceptor();
+
// The list of supported mime types.
base::hash_set<std::string> supported_mime_types_;
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/gview_request_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698