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 #include "chrome/browser/chromeos/gview_request_interceptor.h" | 5 #include "chrome/browser/chromeos/gview_request_interceptor.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
| 11 #include "googleurl/src/gurl.h" |
11 #include "net/base/escape.h" | 12 #include "net/base/escape.h" |
12 #include "net/base/load_flags.h" | 13 #include "net/base/load_flags.h" |
| 14 #include "net/url_request/url_request.h" |
13 #include "net/url_request/url_request_job.h" | 15 #include "net/url_request/url_request_job.h" |
14 #include "net/url_request/url_request.h" | |
15 #include "net/url_request/url_request_redirect_job.h" | 16 #include "net/url_request/url_request_redirect_job.h" |
16 #include "googleurl/src/gurl.h" | |
17 #include "webkit/glue/plugins/plugin_list.h" | 17 #include "webkit/glue/plugins/plugin_list.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 | 20 |
21 // The PDF mime type is treated special if the browser has a built-in | 21 // The PDF mime type is treated special if the browser has a built-in |
22 // PDF viewer plug-in installed - we want to intercept only if we're | 22 // PDF viewer plug-in installed - we want to intercept only if we're |
23 // told to. | 23 // told to. |
24 static const char* const kPdfMimeType = "application/pdf"; | 24 static const char* const kPdfMimeType = "application/pdf"; |
25 | 25 |
26 // This is the list of mime types currently supported by the Google | 26 // This is the list of mime types currently supported by the Google |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 return new URLRequestRedirectJob(request, GURL(url)); | 77 return new URLRequestRedirectJob(request, GURL(url)); |
78 } | 78 } |
79 return NULL; | 79 return NULL; |
80 } | 80 } |
81 | 81 |
82 URLRequest::Interceptor* GViewRequestInterceptor::GetGViewRequestInterceptor() { | 82 URLRequest::Interceptor* GViewRequestInterceptor::GetGViewRequestInterceptor() { |
83 return Singleton<GViewRequestInterceptor>::get(); | 83 return Singleton<GViewRequestInterceptor>::get(); |
84 } | 84 } |
85 | 85 |
86 } // namespace chromeos | 86 } // namespace chromeos |
OLD | NEW |