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

Side by Side Diff: content/common/content_switches_internal.cc

Issue 1860743002: Add a flag to change when android's progress bar completes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing flag default Created 4 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
OLDNEW
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 74 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
75 bool enabled = 75 bool enabled =
76 (command_line->HasSwitch(switches::kEnableUseZoomForDSF) || 76 (command_line->HasSwitch(switches::kEnableUseZoomForDSF) ||
77 use_zoom_for_dsf_enabled_by_default) && 77 use_zoom_for_dsf_enabled_by_default) &&
78 command_line->GetSwitchValueASCII( 78 command_line->GetSwitchValueASCII(
79 switches::kEnableUseZoomForDSF) != "false"; 79 switches::kEnableUseZoomForDSF) != "false";
80 80
81 return enabled; 81 return enabled;
82 } 82 }
83 83
84 ProgressBarCompletion GetProgressBarCompletionPolicy() {
85 #if defined(OS_ANDROID)
86 const base::CommandLine& command_line =
87 *base::CommandLine::ForCurrentProcess();
88 std::string progress_bar_completion =
89 command_line.GetSwitchValueASCII(switches::kProgressBarCompletion);
90 if (progress_bar_completion == "loadEvent")
91 return ProgressBarCompletion::LOAD_EVENT;
92 if (progress_bar_completion == "resourcesBeforeDOMContentLoaded")
93 return ProgressBarCompletion::RESOURCES_BEFORE_DCL;
94 if (progress_bar_completion == "domContentLoaded")
95 return ProgressBarCompletion::DOM_CONTENT_LOADED;
96 if (progress_bar_completion ==
97 "resourcesBeforeDOMContentLoadedAndSameOriginIframes") {
98 return ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES;
99 }
100 #endif
101 return ProgressBarCompletion::LOAD_EVENT;
102 }
103
84 } // namespace content 104 } // namespace content
OLDNEW
« no previous file with comments | « content/common/content_switches_internal.h ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698