OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/remoting/remoting_resources_source.h" | 5 #include "chrome/browser/remoting/remoting_resources_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 .GetRawDataResource(IDR_REMOTING_SETUP_FLOW_HTML)); | 106 .GetRawDataResource(IDR_REMOTING_SETUP_FLOW_HTML)); |
107 response = html.as_string(); | 107 response = html.as_string(); |
108 } | 108 } |
109 // Send the response. | 109 // Send the response. |
110 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); | 110 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); |
111 html_bytes->data.resize(response.size()); | 111 html_bytes->data.resize(response.size()); |
112 std::copy(response.begin(), response.end(), html_bytes->data.begin()); | 112 std::copy(response.begin(), response.end(), html_bytes->data.begin()); |
113 SendResponse(request_id, html_bytes); | 113 SendResponse(request_id, html_bytes); |
114 } | 114 } |
115 | 115 |
| 116 std::string RemotingResourcesSource::GetMimeType( |
| 117 const std::string& path) const { |
| 118 return "text/html"; |
| 119 } |
| 120 |
116 std::string RemotingResourcesSource::GetLocalizedUrl( | 121 std::string RemotingResourcesSource::GetLocalizedUrl( |
117 const std::string& url) const { | 122 const std::string& url) const { |
118 GURL original_url(url); | 123 GURL original_url(url); |
119 DCHECK(original_url.is_valid()); | 124 DCHECK(original_url.is_valid()); |
120 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); | 125 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); |
121 return localized_url.spec(); | 126 return localized_url.spec(); |
122 } | 127 } |
OLD | NEW |