| 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" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // including the origial document's URL, then create a new job that | 73 // including the origial document's URL, then create a new job that |
| 74 // will redirect the browser to this new URL. | 74 // will redirect the browser to this new URL. |
| 75 if (supported_mime_types_.count(mime_type) > 0) { | 75 if (supported_mime_types_.count(mime_type) > 0) { |
| 76 std::string url(kGViewUrlPrefix); | 76 std::string url(kGViewUrlPrefix); |
| 77 url += EscapePath(request->url().spec()); | 77 url += EscapePath(request->url().spec()); |
| 78 return new URLRequestRedirectJob(request, GURL(url)); | 78 return new URLRequestRedirectJob(request, GURL(url)); |
| 79 } | 79 } |
| 80 return NULL; | 80 return NULL; |
| 81 } | 81 } |
| 82 | 82 |
| 83 net::URLRequest::Interceptor* | 83 GViewRequestInterceptor* GViewRequestInterceptor::GetInstance() { |
| 84 GViewRequestInterceptor::GetInstance() { | |
| 85 return Singleton<GViewRequestInterceptor>::get(); | 84 return Singleton<GViewRequestInterceptor>::get(); |
| 86 } | 85 } |
| 87 | 86 |
| 88 } // namespace chromeos | 87 } // namespace chromeos |
| OLD | NEW |