| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 "content/common/content_switches_internal.h" | 5 #include "content/common/content_switches_internal.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } else if (v8_cache_options == "parse") { | 77 } else if (v8_cache_options == "parse") { |
| 78 return V8_CACHE_OPTIONS_PARSE; | 78 return V8_CACHE_OPTIONS_PARSE; |
| 79 } else if (v8_cache_options == "code") { | 79 } else if (v8_cache_options == "code") { |
| 80 return V8_CACHE_OPTIONS_CODE; | 80 return V8_CACHE_OPTIONS_CODE; |
| 81 } else { | 81 } else { |
| 82 return V8_CACHE_OPTIONS_DEFAULT; | 82 return V8_CACHE_OPTIONS_DEFAULT; |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool IsUseZoomForDSFEnabled() { | 86 bool IsUseZoomForDSFEnabled() { |
| 87 static bool enabled = base::CommandLine::ForCurrentProcess()->HasSwitch( | 87 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 88 switches::kEnableUseZoomForDSF); | 88 bool enabled = command_line->HasSwitch(switches::kEnableUseZoomForDSF) && |
| 89 command_line->GetSwitchValueASCII( |
| 90 switches::kEnableUseZoomForDSF) != "false"; |
| 91 |
| 89 return enabled; | 92 return enabled; |
| 90 } | 93 } |
| 91 | 94 |
| 92 } // namespace content | 95 } // namespace content |
| OLD | NEW |