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

Unified Diff: base/firewall_product_detection.cc

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/firewall_product_detection.h ('k') | base/firewall_product_detection_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/firewall_product_detection.cc
diff --git a/base/firewall_product_detection.cc b/base/firewall_product_detection.cc
deleted file mode 100644
index fe3c481f0d626bd3a26f329163ff0a67b69d30c2..0000000000000000000000000000000000000000
--- a/base/firewall_product_detection.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2006-2009 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ========================================================================
-
-#include "omaha/base/firewall_product_detection.h"
-#include "omaha/base/debug.h"
-#include "omaha/base/logging.h"
-#include "omaha/base/reg_key.h"
-#include "omaha/base/utils.h"
-#include "omaha/base/wmi_query.h"
-
-namespace omaha {
-
-namespace firewall_detection {
-
-namespace {
-
-const TCHAR kWmiSecurityCenter[] = _T("root\\SecurityCenter");
-const TCHAR kWmiQueryFirewallProduct[] = _T("select * from FirewallProduct");
-const TCHAR kWmiPropDisplayName[] = _T("displayName");
-const TCHAR kWmiPropVersionNumber[] = _T("versionNumber");
-
-} // namespace
-
-
-HRESULT Detect(CString* name, CString* version) {
- ASSERT1(name);
- ASSERT1(version);
-
- name->Empty();
- version->Empty();
-
- WmiQuery wmi_query;
- HRESULT hr = wmi_query.Connect(kWmiSecurityCenter);
- if (FAILED(hr)) {
- return hr;
- }
- hr = wmi_query.Query(kWmiQueryFirewallProduct);
- if (FAILED(hr)) {
- return hr;
- }
- if (wmi_query.AtEnd()) {
- return E_FAIL;
- }
- hr = wmi_query.GetValue(kWmiPropDisplayName, name);
- if (FAILED(hr)) {
- return hr;
- }
- wmi_query.GetValue(kWmiPropVersionNumber, version);
- return S_OK;
-}
-
-} // namespace firewall_detection
-
-} // namespace omaha
-
« no previous file with comments | « base/firewall_product_detection.h ('k') | base/firewall_product_detection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698