From 04dd0973fcc16a1839bf1a57ad9392857844ad52 Mon Sep 17 00:00:00 2001 From: scottmg Date: Wed, 7 Jan 2015 15:41:48 -0800 Subject: [PATCH] Fix xtree patch check, and in turn C4702 disabling Two bugs: - IsPatched was backwards - The output was "True"/"False", but .gyp was expecting "1"/"0". R=cpu@chromium.org BUG=346399 Review URL: https://codereview.chromium.org/836393002 Cr-Commit-Position: refs/heads/master@{#310409} --- build/win_is_xtree_patched.py | 4 ++-- .../networking_private_verify_delegate_factory_impl.cc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/win_is_xtree_patched.py b/build/win_is_xtree_patched.py index 571732272f54..3f1994ff9d17 100755 --- a/build/win_is_xtree_patched.py +++ b/build/win_is_xtree_patched.py @@ -13,13 +13,13 @@ def IsPatched(): # script (because we know it's patched). Another case could be added here to # query the active VS installation and actually check the contents of xtree. # http://crbug.com/346399. - return os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', 1) == 0 + return int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', 1)) == 1 def DoMain(_): """Hook to be called from gyp without starting a separate python interpreter.""" - return IsPatched() + return "1" if IsPatched() else "0" if __name__ == '__main__': diff --git a/chrome/browser/extensions/api/networking_private/networking_private_verify_delegate_factory_impl.cc b/chrome/browser/extensions/api/networking_private/networking_private_verify_delegate_factory_impl.cc index 9ecc414192a7..f2884d0cecd8 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_verify_delegate_factory_impl.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_verify_delegate_factory_impl.cc @@ -26,8 +26,9 @@ NetworkingPrivateVerifyDelegateFactoryImpl::CreateDelegate() { return make_scoped_ptr(new NetworkingPrivateVerifyDelegateChromeOS()); #elif defined(OS_WIN) || defined(OSMACOSX) return make_scoped_ptr(new CryptoVerifyImpl()); -#endif +#else return nullptr; +#endif } } // namespace extensions -- 2.11.4.GIT