| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 if (!rappor_recorder_) | 1353 if (!rappor_recorder_) |
| 1354 RenderThread::Get()->GetRemoteInterfaces()->GetInterface(&rappor_recorder_); | 1354 RenderThread::Get()->GetRemoteInterfaces()->GetInterface(&rappor_recorder_); |
| 1355 rappor_recorder_->RecordRapporURL(metric, url); | 1355 rappor_recorder_->RecordRapporURL(metric, url); |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 void ChromeContentRendererClient::AddImageContextMenuProperties( | 1358 void ChromeContentRendererClient::AddImageContextMenuProperties( |
| 1359 const WebURLResponse& response, | 1359 const WebURLResponse& response, |
| 1360 std::map<std::string, std::string>* properties) { | 1360 std::map<std::string, std::string>* properties) { |
| 1361 DCHECK(properties); | 1361 DCHECK(properties); |
| 1362 WebString header_key(ASCIIToUTF16( | 1362 WebString header_key(ASCIIToUTF16( |
| 1363 data_reduction_proxy::chrome_proxy_header())); | 1363 data_reduction_proxy::chrome_proxy_content_transform_header())); |
| 1364 if (!response.httpHeaderField(header_key).isNull() && | 1364 if (!response.httpHeaderField(header_key).isNull() && |
| 1365 data_reduction_proxy::IsEmptyImagePreview( | 1365 data_reduction_proxy::IsEmptyImagePreview( |
| 1366 response.httpHeaderField(header_key).utf8())) { | 1366 response.httpHeaderField(header_key).utf8())) { |
| 1367 (*properties)[ | 1367 (*properties)[ |
| 1368 data_reduction_proxy::chrome_proxy_content_transform_header()] = | 1368 data_reduction_proxy::chrome_proxy_content_transform_header()] = |
| 1369 data_reduction_proxy::empty_image_directive(); | 1369 data_reduction_proxy::empty_image_directive(); |
| 1370 } | 1370 } |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 void ChromeContentRendererClient::RunScriptsAtDocumentStart( | 1373 void ChromeContentRendererClient::RunScriptsAtDocumentStart( |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 | 1482 |
| 1483 url::Replacements<char> r; | 1483 url::Replacements<char> r; |
| 1484 r.SetPath(path.c_str(), url::Component(0, path.length())); | 1484 r.SetPath(path.c_str(), url::Component(0, path.length())); |
| 1485 | 1485 |
| 1486 if (result == internal::NUM_PLUGIN_ERROR) | 1486 if (result == internal::NUM_PLUGIN_ERROR) |
| 1487 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; | 1487 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; |
| 1488 | 1488 |
| 1489 RecordYouTubeRewriteUMA(result); | 1489 RecordYouTubeRewriteUMA(result); |
| 1490 return corrected_url.ReplaceComponents(r); | 1490 return corrected_url.ReplaceComponents(r); |
| 1491 } | 1491 } |
| OLD | NEW |