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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 70 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
71 bool enabled = | 71 bool enabled = |
72 (command_line->HasSwitch(switches::kEnableUseZoomForDSF) || | 72 (command_line->HasSwitch(switches::kEnableUseZoomForDSF) || |
73 use_zoom_for_dsf_enabled_by_default) && | 73 use_zoom_for_dsf_enabled_by_default) && |
74 command_line->GetSwitchValueASCII( | 74 command_line->GetSwitchValueASCII( |
75 switches::kEnableUseZoomForDSF) != "false"; | 75 switches::kEnableUseZoomForDSF) != "false"; |
76 | 76 |
77 return enabled; | 77 return enabled; |
78 } | 78 } |
79 | 79 |
80 ProgressBarCompletionOptions GetProgressBarCompletionOptions() { | |
81 #if defined(OS_ANDROID) | |
82 const base::CommandLine& command_line = | |
83 *base::CommandLine::ForCurrentProcess(); | |
84 std::string progress_bar_completion = | |
85 command_line.GetSwitchValueASCII(switches::kProgressBarCompletion); | |
86 if (progress_bar_completion == "loadEvent") | |
87 return PROGRESS_BAR_COMPLETION_LOAD_EVENT; | |
88 if (progress_bar_completion == "dclAndImages") | |
dcheng
2016/05/10 06:28:50
My main concern here is that it's not immediately
Nate Chapin
2016/05/11 00:06:58
I expanded the flag to domContentLoadedAndImages,
| |
89 return PROGRESS_BAR_COMPLETION_DOM_CONTENT_LOADED_AND_IMAGES; | |
90 if (progress_bar_completion == "domContentLoaded") | |
91 return PROGRESS_BAR_COMPLETION_DOM_CONTENT_LOADED; | |
92 #endif | |
93 return PROGRESS_BAR_COMPLETION_LOAD_EVENT; | |
94 } | |
95 | |
80 } // namespace content | 96 } // namespace content |
OLD | NEW |