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

Side by Side Diff: chrome/browser/ui/webui/plugins_ui.cc

Issue 7519030: Fix regression that did not allow incognito window of first profile launched to modify plugin set... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/ui/webui/plugins_ui.h" 5 #include "chrome/browser/ui/webui/plugins_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 void PluginsDOMHandler::HandleRequestPluginsData(const ListValue* args) { 180 void PluginsDOMHandler::HandleRequestPluginsData(const ListValue* args) {
181 LoadPlugins(); 181 LoadPlugins();
182 } 182 }
183 183
184 void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) { 184 void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
185 // If a non-first-profile user tries to trigger these methods sneakily, 185 // If a non-first-profile user tries to trigger these methods sneakily,
186 // forbid it. 186 // forbid it.
187 #if !defined(OS_CHROMEOS) 187 #if !defined(OS_CHROMEOS)
188 if (!web_ui_->GetProfile()->first_launched()) 188 if (!web_ui_->GetProfile()->GetOriginalProfile()->first_launched())
189 return; 189 return;
190 #endif 190 #endif
191 191
192 // Be robust in accepting badness since plug-ins display HTML (hence 192 // Be robust in accepting badness since plug-ins display HTML (hence
193 // JavaScript). 193 // JavaScript).
194 if (args->GetSize() != 3) 194 if (args->GetSize() != 3)
195 return; 195 return;
196 196
197 std::string enable_str; 197 std::string enable_str;
198 std::string is_group_str; 198 std::string is_group_str;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, 327 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF,
328 false, 328 false,
329 PrefService::UNSYNCABLE_PREF); 329 PrefService::UNSYNCABLE_PREF);
330 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, 330 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails,
331 false, 331 false,
332 PrefService::UNSYNCABLE_PREF); 332 PrefService::UNSYNCABLE_PREF);
333 prefs->RegisterBooleanPref(prefs::kPluginsShowSetReaderDefaultInfobar, 333 prefs->RegisterBooleanPref(prefs::kPluginsShowSetReaderDefaultInfobar,
334 true, 334 true,
335 PrefService::UNSYNCABLE_PREF); 335 PrefService::UNSYNCABLE_PREF);
336 } 336 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698