Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ |
| 6 #define CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ | 6 #define CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 // Always returns NULL because we don't want to attempt a redirect | 25 // Always returns NULL because we don't want to attempt a redirect |
| 26 // before seeing the detected mime type of the request. | 26 // before seeing the detected mime type of the request. |
| 27 virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request); | 27 virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request); |
| 28 | 28 |
| 29 // Determines if the requested document can be viewed by the Google | 29 // Determines if the requested document can be viewed by the Google |
| 30 // Document Viewer. If it can, returns a net::URLRequestJob that | 30 // Document Viewer. If it can, returns a net::URLRequestJob that |
| 31 // redirects the browser to the view URL. | 31 // redirects the browser to the view URL. |
| 32 virtual net::URLRequestJob* MaybeInterceptResponse(net::URLRequest* request); | 32 virtual net::URLRequestJob* MaybeInterceptResponse(net::URLRequest* request); |
| 33 | 33 |
| 34 // Singleton accessor. | 34 // Singleton accessor. |
| 35 static net::URLRequest::Interceptor* GetInstance(); | 35 static GViewRequestInterceptor* GetInstance(); |
|
M-A Ruel
2010/12/13 15:54:02
I think you should keep returning the interface.
Satish
2010/12/13 15:57:49
This change is required because soon Singleton<T>
M-A Ruel
2010/12/13 16:16:37
No problem then.
lgtm
| |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 friend struct DefaultSingletonTraits<GViewRequestInterceptor>; | 38 friend struct DefaultSingletonTraits<GViewRequestInterceptor>; |
| 39 | 39 |
| 40 GViewRequestInterceptor(); | 40 GViewRequestInterceptor(); |
| 41 virtual ~GViewRequestInterceptor(); | 41 virtual ~GViewRequestInterceptor(); |
| 42 | 42 |
| 43 // The list of supported mime types. | 43 // The list of supported mime types. |
| 44 base::hash_set<std::string> supported_mime_types_; | 44 base::hash_set<std::string> supported_mime_types_; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace chromeos | 47 } // namespace chromeos |
| 48 | 48 |
| 49 #endif // CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ | 49 #endif // CHROME_BROWSER_CHROMEOS_GVIEW_REQUEST_INTERCEPTOR_H__ |
| OLD | NEW |