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 63 matching lines...) Loading... |
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 net::URLRequest::Interceptor* |
84 GViewRequestInterceptor::GetGViewRequestInterceptor() { | 84 GViewRequestInterceptor::GetInstance() { |
85 return Singleton<GViewRequestInterceptor>::get(); | 85 return Singleton<GViewRequestInterceptor>::get(); |
86 } | 86 } |
87 | 87 |
88 } // namespace chromeos | 88 } // namespace chromeos |
OLD | NEW |