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

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

Issue 159059: Enable DOM_STORAGE in our build. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | chrome/common/chrome_switches.h » ('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) 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 "render_view_host_delegate_helper.h" 5 #include "render_view_host_delegate_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/character_encoding.h" 9 #include "chrome/browser/character_encoding.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 prefs->GetBoolean(prefs::kWebKitJavaEnabled); 169 prefs->GetBoolean(prefs::kWebKitJavaEnabled);
170 web_prefs.loads_images_automatically = 170 web_prefs.loads_images_automatically =
171 !command_line.HasSwitch(switches::kDisableImages) && 171 !command_line.HasSwitch(switches::kDisableImages) &&
172 prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically); 172 prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically);
173 web_prefs.uses_page_cache = 173 web_prefs.uses_page_cache =
174 command_line.HasSwitch(switches::kEnableFastback); 174 command_line.HasSwitch(switches::kEnableFastback);
175 web_prefs.remote_fonts_enabled = 175 web_prefs.remote_fonts_enabled =
176 command_line.HasSwitch(switches::kEnableRemoteFonts); 176 command_line.HasSwitch(switches::kEnableRemoteFonts);
177 web_prefs.xss_auditor_enabled = 177 web_prefs.xss_auditor_enabled =
178 command_line.HasSwitch(switches::kEnableXSSAuditor); 178 command_line.HasSwitch(switches::kEnableXSSAuditor);
179 web_prefs.local_storage_enabled =
180 command_line.HasSwitch(switches::kEnableLocalStorage);
181 web_prefs.session_storage_enabled =
182 command_line.HasSwitch(switches::kEnableSessionStorage);
179 } 183 }
180 184
181 web_prefs.uses_universal_detector = 185 web_prefs.uses_universal_detector =
182 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); 186 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector);
183 web_prefs.text_areas_are_resizable = 187 web_prefs.text_areas_are_resizable =
184 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); 188 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable);
185 189
186 // User CSS is currently disabled because it crashes chrome. See 190 // User CSS is currently disabled because it crashes chrome. See
187 // webkit/glue/webpreferences.h for more details. 191 // webkit/glue/webpreferences.h for more details.
188 192
189 // Make sure we will set the default_encoding with canonical encoding name. 193 // Make sure we will set the default_encoding with canonical encoding name.
190 web_prefs.default_encoding = 194 web_prefs.default_encoding =
191 CharacterEncoding::GetCanonicalEncodingNameByAliasName( 195 CharacterEncoding::GetCanonicalEncodingNameByAliasName(
192 web_prefs.default_encoding); 196 web_prefs.default_encoding);
193 if (web_prefs.default_encoding.empty()) { 197 if (web_prefs.default_encoding.empty()) {
194 prefs->ClearPref(prefs::kDefaultCharset); 198 prefs->ClearPref(prefs::kDefaultCharset);
195 web_prefs.default_encoding = prefs->GetString( 199 web_prefs.default_encoding = prefs->GetString(
196 prefs::kDefaultCharset); 200 prefs::kDefaultCharset);
197 } 201 }
198 DCHECK(!web_prefs.default_encoding.empty()); 202 DCHECK(!web_prefs.default_encoding.empty());
199 203
200 if (is_dom_ui) { 204 if (is_dom_ui) {
201 web_prefs.loads_images_automatically = true; 205 web_prefs.loads_images_automatically = true;
202 web_prefs.javascript_enabled = true; 206 web_prefs.javascript_enabled = true;
203 } 207 }
204 208
205 return web_prefs; 209 return web_prefs;
206 } 210 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698