Chromium Code Reviews| 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 786 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name), | 786 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name), |
| 787 power_saver_info); | 787 power_saver_info); |
| 788 placeholder->set_blocked_for_prerendering(is_prerendering); | 788 placeholder->set_blocked_for_prerendering(is_prerendering); |
| 789 placeholder->set_blocked_for_tinyness(blocked_for_tinyness); | 789 placeholder->set_blocked_for_tinyness(blocked_for_tinyness); |
| 790 placeholder->AllowLoading(); | 790 placeholder->AllowLoading(); |
| 791 break; | 791 break; |
| 792 } | 792 } |
| 793 | 793 |
| 794 std::unique_ptr<content::PluginInstanceThrottler> throttler; | 794 std::unique_ptr<content::PluginInstanceThrottler> throttler; |
| 795 if (power_saver_info.power_saver_enabled) { | 795 if (power_saver_info.power_saver_enabled) { |
| 796 throttler = PluginInstanceThrottler::Create(); | 796 throttler = |
| 797 PluginInstanceThrottler::Create(true /* record_decision */); | |
|
groby-ooo-7-16
2016/08/05 21:16:52
Please use enum instead of true/false with comment
tommycli
2016/08/08 18:02:01
Done.
| |
| 797 // PluginPreroller manages its own lifetime. | 798 // PluginPreroller manages its own lifetime. |
| 798 new PluginPreroller( | 799 new PluginPreroller( |
| 799 render_frame, frame, params, info, identifier, group_name, | 800 render_frame, frame, params, info, identifier, group_name, |
| 800 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name), | 801 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name), |
| 801 throttler.get()); | 802 throttler.get()); |
| 802 } | 803 } |
| 803 | 804 |
| 804 return render_frame->CreatePlugin(frame, info, params, | 805 return render_frame->CreatePlugin(frame, info, params, |
| 805 std::move(throttler)); | 806 std::move(throttler)); |
| 806 } | 807 } |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1372 // chrome.system.network.getNetworkInterfaces provides the same | 1373 // chrome.system.network.getNetworkInterfaces provides the same |
| 1373 // information. Also, the enforcement of sending and binding UDP is already done | 1374 // information. Also, the enforcement of sending and binding UDP is already done |
| 1374 // by chrome extension permission model. | 1375 // by chrome extension permission model. |
| 1375 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1376 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
| 1376 #if defined(ENABLE_EXTENSIONS) | 1377 #if defined(ENABLE_EXTENSIONS) |
| 1377 return !IsStandaloneExtensionProcess(); | 1378 return !IsStandaloneExtensionProcess(); |
| 1378 #else | 1379 #else |
| 1379 return true; | 1380 return true; |
| 1380 #endif | 1381 #endif |
| 1381 } | 1382 } |
| OLD | NEW |