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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 2345483002: [scheduler] Throttle background frames with 1% CPU limit (Closed)
Patch Set: Address skyostil@ comments. Created 4 years, 2 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) 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/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME, 2096 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME,
2097 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS, 2097 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS,
2098 SINGLE_VALUE_TYPE_AND_VALUE( 2098 SINGLE_VALUE_TYPE_AND_VALUE(
2099 chromeos::switches::kArcUseAuthEndpoint, 2099 chromeos::switches::kArcUseAuthEndpoint,
2100 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/" 2100 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/"
2101 "ExchangeToken")}, 2101 "ExchangeToken")},
2102 #endif // OS_CHROMEOS 2102 #endif // OS_CHROMEOS
2103 {"material-security-verbose", IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_NAME, 2103 {"material-security-verbose", IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_NAME,
2104 IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DESCRIPTION, kOsDesktop, 2104 IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DESCRIPTION, kOsDesktop,
2105 MULTI_VALUE_TYPE(kSecurityVerboseChoices)}, 2105 MULTI_VALUE_TYPE(kSecurityVerboseChoices)},
2106 {"expensive-background-timer-throttling",
2107 IDS_FLAGS_EXPENSIVE_BACKGROUND_TIMER_THROTTLING_NAME,
2108 IDS_FLAGS_EXPENSIVE_BACKGROUND_TIMER_THROTTLING_DESCRIPTION, kOsAll,
2109 FEATURE_VALUE_TYPE(features::kExpensiveBackgroundTimerThrottling)},
2106 // NOTE: Adding new command-line switches requires adding corresponding 2110 // NOTE: Adding new command-line switches requires adding corresponding
2107 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2111 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2108 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2112 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2109 }; 2113 };
2110 2114
2111 class FlagsStateSingleton { 2115 class FlagsStateSingleton {
2112 public: 2116 public:
2113 FlagsStateSingleton() 2117 FlagsStateSingleton()
2114 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} 2118 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {}
2115 ~FlagsStateSingleton() {} 2119 ~FlagsStateSingleton() {}
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2308 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2305 2309
2306 const FeatureEntry* GetFeatureEntries(size_t* count) { 2310 const FeatureEntry* GetFeatureEntries(size_t* count) {
2307 *count = arraysize(kFeatureEntries); 2311 *count = arraysize(kFeatureEntries);
2308 return kFeatureEntries; 2312 return kFeatureEntries;
2309 } 2313 }
2310 2314
2311 } // namespace testing 2315 } // namespace testing
2312 2316
2313 } // namespace about_flags 2317 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698