Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2211753002: Plugin Power Saver Tiny: Fix Plugin.PowerSaver.PeripheralHeuristic UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge. and change to enum Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(RenderFrame::RECORD_DECISION);
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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 // chrome.system.network.getNetworkInterfaces provides the same 1383 // chrome.system.network.getNetworkInterfaces provides the same
1383 // information. Also, the enforcement of sending and binding UDP is already done 1384 // information. Also, the enforcement of sending and binding UDP is already done
1384 // by chrome extension permission model. 1385 // by chrome extension permission model.
1385 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { 1386 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() {
1386 #if defined(ENABLE_EXTENSIONS) 1387 #if defined(ENABLE_EXTENSIONS)
1387 return !IsStandaloneExtensionProcess(); 1388 return !IsStandaloneExtensionProcess();
1388 #else 1389 #else
1389 return true; 1390 return true;
1390 #endif 1391 #endif
1391 } 1392 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698