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

Side by Side Diff: chrome/browser/google/google_update_win.cc

Issue 2619323003: Remove uses of BrowserDistribution::CHROME_BINARIES in installer_util. (Closed)
Patch Set: Created 3 years, 11 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/google/google_update_win.h" 5 #include "chrome/browser/google/google_update_win.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <string.h> 10 #include <string.h>
11 11
12 #include <string>
12 #include <utility> 13 #include <utility>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/bind.h" 16 #include "base/bind.h"
16 #include "base/callback.h" 17 #include "base/callback.h"
17 #include "base/files/file_path.h" 18 #include "base/files/file_path.h"
18 #include "base/location.h" 19 #include "base/location.h"
19 #include "base/macros.h" 20 #include "base/macros.h"
20 #include "base/metrics/histogram_macros.h" 21 #include "base/metrics/histogram_macros.h"
21 #include "base/metrics/sparse_histogram.h" 22 #include "base/metrics/sparse_histogram.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 // check. 557 // check.
557 app_bundle->put_parentHWND( 558 app_bundle->put_parentHWND(
558 reinterpret_cast<ULONG_PTR>(elevation_window_)); 559 reinterpret_cast<ULONG_PTR>(elevation_window_));
559 } 560 }
560 app_bundle_.swap(app_bundle); 561 app_bundle_.swap(app_bundle);
561 } 562 }
562 563
563 // Get a reference to the Chrome app in the bundle. 564 // Get a reference to the Chrome app in the bundle.
564 if (!app_) { 565 if (!app_) {
565 base::string16 app_guid = 566 base::string16 app_guid =
566 installer::GetAppGuidForUpdates(system_level_install_); 567 BrowserDistribution::GetDistribution()->GetAppGuid();
567 DCHECK(!app_guid.empty()); 568 DCHECK(!app_guid.empty());
568 569
569 base::win::ScopedComPtr<IDispatch> dispatch; 570 base::win::ScopedComPtr<IDispatch> dispatch;
570 // It is common for this call to fail with APP_USING_EXTERNAL_UPDATER if 571 // It is common for this call to fail with APP_USING_EXTERNAL_UPDATER if
571 // an auto update is in progress. 572 // an auto update is in progress.
572 hresult = app_bundle_->createInstalledApp( 573 hresult = app_bundle_->createInstalledApp(
573 base::win::ScopedBstr(app_guid.c_str())); 574 base::win::ScopedBstr(app_guid.c_str()));
574 if (FAILED(hresult)) 575 if (FAILED(hresult))
575 return hresult; 576 return hresult;
576 // Move the IAppBundleWeb reference into a local now so that failures from 577 // Move the IAppBundleWeb reference into a local now so that failures from
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 const GoogleUpdate3ClassFactory& google_update_factory) { 890 const GoogleUpdate3ClassFactory& google_update_factory) {
890 if (g_google_update_factory) { 891 if (g_google_update_factory) {
891 delete g_google_update_factory; 892 delete g_google_update_factory;
892 g_google_update_factory = nullptr; 893 g_google_update_factory = nullptr;
893 } 894 }
894 if (!google_update_factory.is_null()) { 895 if (!google_update_factory.is_null()) {
895 g_google_update_factory = 896 g_google_update_factory =
896 new GoogleUpdate3ClassFactory(google_update_factory); 897 new GoogleUpdate3ClassFactory(google_update_factory);
897 } 898 }
898 } 899 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698