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

Side by Side Diff: chrome/browser/policy/policy_prefs_browsertest.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 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) 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 <algorithm> 5 #include <algorithm>
6 #include <cstdlib> 6 #include <cstdlib>
7 #include <map> 7 #include <map>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 continue; 552 continue;
553 553
554 LOG(INFO) << "Testing policy: " << policy->first; 554 LOG(INFO) << "Testing policy: " << policy->first;
555 555
556 for (ScopedVector<PrefMapping>::const_iterator pref_mapping = 556 for (ScopedVector<PrefMapping>::const_iterator pref_mapping =
557 pref_mappings.begin(); 557 pref_mappings.begin();
558 pref_mapping != pref_mappings.end(); 558 pref_mapping != pref_mappings.end();
559 ++pref_mapping) { 559 ++pref_mapping) {
560 // Skip Chrome OS preferences that use a different backend and cannot be 560 // Skip Chrome OS preferences that use a different backend and cannot be
561 // retrieved through the prefs mechanism. 561 // retrieved through the prefs mechanism.
562 if (base::StartsWithASCII((*pref_mapping)->pref(), kCrosSettingsPrefix, 562 if (base::StartsWith((*pref_mapping)->pref(), kCrosSettingsPrefix,
563 true)) 563 base::CompareCase::SENSITIVE))
564 continue; 564 continue;
565 565
566 // Skip preferences that should not be checked when the policy is set to 566 // Skip preferences that should not be checked when the policy is set to
567 // a mandatory value. 567 // a mandatory value.
568 if (!(*pref_mapping)->check_for_mandatory()) 568 if (!(*pref_mapping)->check_for_mandatory())
569 continue; 569 continue;
570 570
571 PrefService* prefs = 571 PrefService* prefs =
572 (*pref_mapping)->is_local_state() ? local_state : user_prefs; 572 (*pref_mapping)->is_local_state() ? local_state : user_prefs;
573 // The preference must have been registered. 573 // The preference must have been registered.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 } 752 }
753 } 753 }
754 } 754 }
755 } 755 }
756 756
757 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance, 757 INSTANTIATE_TEST_CASE_P(PolicyPrefIndicatorTestInstance,
758 PolicyPrefIndicatorTest, 758 PolicyPrefIndicatorTest,
759 testing::ValuesIn(SplitPoliciesIntoChunks(10))); 759 testing::ValuesIn(SplitPoliciesIntoChunks(10)));
760 760
761 } // namespace policy 761 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698