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 "chrome/renderer/chrome_render_process_observer.h" | 5 #include "chrome/renderer/chrome_render_process_observer.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/allocator/allocator_extension.h" | 10 #include "base/allocator/allocator_extension.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 pending_cache_min_dead_capacity_(0), | 262 pending_cache_min_dead_capacity_(0), |
263 pending_cache_max_dead_capacity_(0), | 263 pending_cache_max_dead_capacity_(0), |
264 pending_cache_capacity_(kUnitializedCacheCapacity) { | 264 pending_cache_capacity_(kUnitializedCacheCapacity) { |
265 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 265 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
266 if (command_line.HasSwitch(switches::kEnableWatchdog)) { | 266 if (command_line.HasSwitch(switches::kEnableWatchdog)) { |
267 // TODO(JAR): Need to implement renderer IO msgloop watchdog. | 267 // TODO(JAR): Need to implement renderer IO msgloop watchdog. |
268 } | 268 } |
269 | 269 |
270 #if defined(ENABLE_AUTOFILL_DIALOG) | 270 #if defined(ENABLE_AUTOFILL_DIALOG) |
271 #if defined(OS_MACOSX) | 271 #if defined(OS_MACOSX) |
| 272 // Interactive autocomplete is on by default for Dev/Canary, off by default |
| 273 // for Beta/Stable. |
272 bool enableAutofill = command_line.HasSwitch( | 274 bool enableAutofill = command_line.HasSwitch( |
273 autofill::switches::kEnableInteractiveAutocomplete); | 275 autofill::switches::kEnableInteractiveAutocomplete); |
| 276 |
| 277 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 278 if (channel != chrome::VersionInfo::CHANNEL_BETA && |
| 279 channel != chrome::VersionInfo::CHANNEL_STABLE) { |
| 280 enableAutofill = !command_line.HasSwitch( |
| 281 autofill::switches::kDisableInteractiveAutocomplete); |
| 282 } |
274 #else | 283 #else |
275 bool enableAutofill = !command_line.HasSwitch( | 284 bool enableAutofill = !command_line.HasSwitch( |
276 autofill::switches::kDisableInteractiveAutocomplete); | 285 autofill::switches::kDisableInteractiveAutocomplete); |
277 #endif | 286 #endif |
278 WebRuntimeFeatures::enableRequestAutocomplete( | 287 WebRuntimeFeatures::enableRequestAutocomplete( |
279 enableAutofill || | 288 enableAutofill || |
280 command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)); | 289 command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)); |
281 #endif | 290 #endif |
282 | 291 |
283 RenderThread* thread = RenderThread::Get(); | 292 RenderThread* thread = RenderThread::Get(); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 if (clear_cache_pending_ && webkit_initialized_) { | 459 if (clear_cache_pending_ && webkit_initialized_) { |
451 clear_cache_pending_ = false; | 460 clear_cache_pending_ = false; |
452 WebCache::clear(); | 461 WebCache::clear(); |
453 } | 462 } |
454 } | 463 } |
455 | 464 |
456 const RendererContentSettingRules* | 465 const RendererContentSettingRules* |
457 ChromeRenderProcessObserver::content_setting_rules() const { | 466 ChromeRenderProcessObserver::content_setting_rules() const { |
458 return &content_setting_rules_; | 467 return &content_setting_rules_; |
459 } | 468 } |
OLD | NEW |