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

Side by Side Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 339093: Change notification cmd line enabling to use the new RuntimeEnabledFeatures c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/render_view_host_delegate_helper.h" 5 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/character_encoding.h" 10 #include "chrome/browser/character_encoding.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 command_line.HasSwitch(switches::kEnableApplicationCache); 180 command_line.HasSwitch(switches::kEnableApplicationCache);
181 181
182 web_prefs.local_storage_enabled = 182 web_prefs.local_storage_enabled =
183 command_line.HasSwitch(switches::kEnableLocalStorage); 183 command_line.HasSwitch(switches::kEnableLocalStorage);
184 web_prefs.databases_enabled = 184 web_prefs.databases_enabled =
185 command_line.HasSwitch(switches::kEnableDatabases); 185 command_line.HasSwitch(switches::kEnableDatabases);
186 web_prefs.session_storage_enabled = 186 web_prefs.session_storage_enabled =
187 command_line.HasSwitch(switches::kEnableSessionStorage); 187 command_line.HasSwitch(switches::kEnableSessionStorage);
188 web_prefs.experimental_webgl_enabled = 188 web_prefs.experimental_webgl_enabled =
189 command_line.HasSwitch(switches::kEnableExperimentalWebGL); 189 command_line.HasSwitch(switches::kEnableExperimentalWebGL);
190 web_prefs.experimental_notifications_enabled =
191 command_line.HasSwitch(switches::kEnableDesktopNotifications);
192 } 190 }
193 191
194 web_prefs.uses_universal_detector = 192 web_prefs.uses_universal_detector =
195 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); 193 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector);
196 web_prefs.text_areas_are_resizable = 194 web_prefs.text_areas_are_resizable =
197 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); 195 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable);
198 196
199 // User CSS is currently disabled because it crashes chrome. See 197 // User CSS is currently disabled because it crashes chrome. See
200 // webkit/glue/webpreferences.h for more details. 198 // webkit/glue/webpreferences.h for more details.
201 199
202 // Make sure we will set the default_encoding with canonical encoding name. 200 // Make sure we will set the default_encoding with canonical encoding name.
203 web_prefs.default_encoding = 201 web_prefs.default_encoding =
204 CharacterEncoding::GetCanonicalEncodingNameByAliasName( 202 CharacterEncoding::GetCanonicalEncodingNameByAliasName(
205 web_prefs.default_encoding); 203 web_prefs.default_encoding);
206 if (web_prefs.default_encoding.empty()) { 204 if (web_prefs.default_encoding.empty()) {
207 prefs->ClearPref(prefs::kDefaultCharset); 205 prefs->ClearPref(prefs::kDefaultCharset);
208 web_prefs.default_encoding = WideToASCII( 206 web_prefs.default_encoding = WideToASCII(
209 prefs->GetString(prefs::kDefaultCharset)); 207 prefs->GetString(prefs::kDefaultCharset));
210 } 208 }
211 DCHECK(!web_prefs.default_encoding.empty()); 209 DCHECK(!web_prefs.default_encoding.empty());
212 210
213 if (is_dom_ui) { 211 if (is_dom_ui) {
214 web_prefs.loads_images_automatically = true; 212 web_prefs.loads_images_automatically = true;
215 web_prefs.javascript_enabled = true; 213 web_prefs.javascript_enabled = true;
216 } 214 }
217 215
218 return web_prefs; 216 return web_prefs;
219 } 217 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698