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 <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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 #if defined(OS_MACOSX) | 1075 #if defined(OS_MACOSX) |
1076 // The plugins directory isn't read by default on the Mac, so it needs to be | 1076 // The plugins directory isn't read by default on the Mac, so it needs to be |
1077 // explicitly registered. | 1077 // explicitly registered. |
1078 base::FilePath app_dir; | 1078 base::FilePath app_dir; |
1079 PathService::Get(chrome::DIR_APP, &app_dir); | 1079 PathService::Get(chrome::DIR_APP, &app_dir); |
1080 command_line->AppendSwitchPath( | 1080 command_line->AppendSwitchPath( |
1081 switches::kExtraPluginDir, | 1081 switches::kExtraPluginDir, |
1082 app_dir.Append(FILE_PATH_LITERAL("plugins"))); | 1082 app_dir.Append(FILE_PATH_LITERAL("plugins"))); |
1083 #endif | 1083 #endif |
1084 command_line->AppendSwitch(switches::kAlwaysAuthorizePlugins); | 1084 command_line->AppendSwitch(switches::kAlwaysAuthorizePlugins); |
| 1085 command_line->AppendSwitch(switches::kEnableNpapi); |
1085 } | 1086 } |
1086 | 1087 |
1087 void SetPreference(NetworkPredictionOptions value) { | 1088 void SetPreference(NetworkPredictionOptions value) { |
1088 browser()->profile()->GetPrefs()->SetInteger( | 1089 browser()->profile()->GetPrefs()->SetInteger( |
1089 prefs::kNetworkPredictionOptions, value); | 1090 prefs::kNetworkPredictionOptions, value); |
1090 } | 1091 } |
1091 | 1092 |
1092 void CreateTestFieldTrial(const std::string& name, | 1093 void CreateTestFieldTrial(const std::string& name, |
1093 const std::string& group_name) { | 1094 const std::string& group_name) { |
1094 base::FieldTrial* trial = base::FieldTrialList::CreateFieldTrial( | 1095 base::FieldTrial* trial = base::FieldTrialList::CreateFieldTrial( |
(...skipping 3227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4322 TestShouldDisableLocalPredictorPreferenceNetworkMatrix( | 4323 TestShouldDisableLocalPredictorPreferenceNetworkMatrix( |
4323 true /*preference_wifi_network_wifi*/, | 4324 true /*preference_wifi_network_wifi*/, |
4324 true /*preference_wifi_network_4g*/, | 4325 true /*preference_wifi_network_4g*/, |
4325 true /*preference_always_network_wifi*/, | 4326 true /*preference_always_network_wifi*/, |
4326 false /*preference_always_network_4g*/, | 4327 false /*preference_always_network_4g*/, |
4327 true /*preference_never_network_wifi*/, | 4328 true /*preference_never_network_wifi*/, |
4328 true /*preference_never_network_4g*/); | 4329 true /*preference_never_network_4g*/); |
4329 } | 4330 } |
4330 | 4331 |
4331 } // namespace prerender | 4332 } // namespace prerender |
OLD | NEW |