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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 645203002: Block NPAPI plugins by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make npapi plugin load tests more robust. remove ifdefs Created 6 years, 2 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
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 <deque> 5 #include <deque>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 #if defined(OS_MACOSX) 1081 #if defined(OS_MACOSX)
1082 // The plugins directory isn't read by default on the Mac, so it needs to be 1082 // The plugins directory isn't read by default on the Mac, so it needs to be
1083 // explicitly registered. 1083 // explicitly registered.
1084 base::FilePath app_dir; 1084 base::FilePath app_dir;
1085 PathService::Get(chrome::DIR_APP, &app_dir); 1085 PathService::Get(chrome::DIR_APP, &app_dir);
1086 command_line->AppendSwitchPath( 1086 command_line->AppendSwitchPath(
1087 switches::kExtraPluginDir, 1087 switches::kExtraPluginDir,
1088 app_dir.Append(FILE_PATH_LITERAL("plugins"))); 1088 app_dir.Append(FILE_PATH_LITERAL("plugins")));
1089 #endif 1089 #endif
1090 command_line->AppendSwitch(switches::kAlwaysAuthorizePlugins); 1090 command_line->AppendSwitch(switches::kAlwaysAuthorizePlugins);
1091 #if defined(OS_WIN) || defined(OS_MACOSX)
1092 command_line->AppendSwitch(switches::kEnableNpapi);
1093 #endif
1091 } 1094 }
1092 1095
1093 void SetPreference(NetworkPredictionOptions value) { 1096 void SetPreference(NetworkPredictionOptions value) {
1094 browser()->profile()->GetPrefs()->SetInteger( 1097 browser()->profile()->GetPrefs()->SetInteger(
1095 prefs::kNetworkPredictionOptions, value); 1098 prefs::kNetworkPredictionOptions, value);
1096 } 1099 }
1097 1100
1098 void CreateTestFieldTrial(const std::string& name, 1101 void CreateTestFieldTrial(const std::string& name,
1099 const std::string& group_name) { 1102 const std::string& group_name) {
1100 base::FieldTrial* trial = base::FieldTrialList::CreateFieldTrial( 1103 base::FieldTrial* trial = base::FieldTrialList::CreateFieldTrial(
(...skipping 3503 matching lines...) Expand 10 before | Expand all | Expand 10 after
4604 TestShouldDisableLocalPredictorPreferenceNetworkMatrix( 4607 TestShouldDisableLocalPredictorPreferenceNetworkMatrix(
4605 true /*preference_wifi_network_wifi*/, 4608 true /*preference_wifi_network_wifi*/,
4606 true /*preference_wifi_network_4g*/, 4609 true /*preference_wifi_network_4g*/,
4607 true /*preference_always_network_wifi*/, 4610 true /*preference_always_network_wifi*/,
4608 false /*preference_always_network_4g*/, 4611 false /*preference_always_network_4g*/,
4609 true /*preference_never_network_wifi*/, 4612 true /*preference_never_network_wifi*/,
4610 true /*preference_never_network_4g*/); 4613 true /*preference_never_network_4g*/);
4611 } 4614 }
4612 4615
4613 } // namespace prerender 4616 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698