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

Side by Side Diff: chrome/installer/setup/setup_util_unittest.cc

Issue 1501153002: Revert of clang/win: Enable -Wunused-value completely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | sandbox/win/src/sid.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/installer/setup/setup_util_unittest.h" 5 #include "chrome/installer/setup/setup_util_unittest.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 610 }
611 611
612 ASSERT_TRUE(RegKey(root_, path_.c_str(), KEY_WRITE).Valid()); 612 ASSERT_TRUE(RegKey(root_, path_.c_str(), KEY_WRITE).Valid());
613 DeleteRegistryKeyPartial(root_, path_.c_str(), to_preserve_); 613 DeleteRegistryKeyPartial(root_, path_.c_str(), to_preserve_);
614 ASSERT_TRUE(RegKey(root_, path_.c_str(), KEY_READ).Valid()); 614 ASSERT_TRUE(RegKey(root_, path_.c_str(), KEY_READ).Valid());
615 615
616 // Ensure that the preserved subkeys are still present. 616 // Ensure that the preserved subkeys are still present.
617 { 617 {
618 base::win::RegistryKeyIterator it(root_, path_.c_str()); 618 base::win::RegistryKeyIterator it(root_, path_.c_str());
619 ASSERT_EQ(to_preserve_.size(), it.SubkeyCount()); 619 ASSERT_EQ(to_preserve_.size(), it.SubkeyCount());
620 for (; it.Valid(); ++it) { 620 for (it; it.Valid(); ++it) {
621 ASSERT_NE(to_preserve_.end(), 621 ASSERT_NE(to_preserve_.end(),
622 std::find_if(to_preserve_.begin(), to_preserve_.end(), 622 std::find_if(to_preserve_.begin(), to_preserve_.end(),
623 [&it](const base::string16& key_name) { 623 [&it](const base::string16& key_name) {
624 return base::ToLowerASCII(it.Name()) == 624 return base::ToLowerASCII(it.Name()) ==
625 base::ToLowerASCII(key_name); 625 base::ToLowerASCII(key_name);
626 })) 626 }))
627 << it.Name(); 627 << it.Name();
628 } 628 }
629 } 629 }
630 630
631 // Ensure that all values are absent. 631 // Ensure that all values are absent.
632 { 632 {
633 base::win::RegistryValueIterator it(root_, path_.c_str()); 633 base::win::RegistryValueIterator it(root_, path_.c_str());
634 ASSERT_EQ(0, it.ValueCount()); 634 ASSERT_EQ(0, it.ValueCount());
635 } 635 }
636 } 636 }
637 637
638 } // namespace installer 638 } // namespace installer
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | sandbox/win/src/sid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698