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

Side by Side Diff: chrome/browser/component_updater/caps_installer_win.cc

Issue 1740333002: Allow fallback from https to http for component update checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/chrome_component_updater_configurator.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/component_updater/caps_installer_win.h" 5 #include "chrome/browser/component_updater/caps_installer_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector>
10 11
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/command_line.h" 13 #include "base/command_line.h"
13 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
14 #include "base/files/file_util.h" 15 #include "base/files/file_util.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
17 #include "base/path_service.h" 18 #include "base/path_service.h"
18 #include "base/process/launch.h" 19 #include "base/process/launch.h"
19 #include "base/threading/worker_pool.h" 20 #include "base/threading/worker_pool.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 72
72 bool VerifyInstallation(const base::DictionaryValue& manifest, 73 bool VerifyInstallation(const base::DictionaryValue& manifest,
73 const base::FilePath& dir) const override { 74 const base::FilePath& dir) const override {
74 bool has_binary = base::PathExists(dir.Append(kCapsBinary)); 75 bool has_binary = base::PathExists(dir.Append(kCapsBinary));
75 ReportUmaStep(has_binary ? CAPS_COMPONENT_READY : CAPS_COMPONENT_MISSING); 76 ReportUmaStep(has_binary ? CAPS_COMPONENT_READY : CAPS_COMPONENT_MISSING);
76 return has_binary; 77 return has_binary;
77 } 78 }
78 79
79 bool CanAutoUpdate() const override { return true; } 80 bool CanAutoUpdate() const override { return true; }
80 81
82 bool RequiresNetworkEncryption() const override { return false; }
83
81 bool OnCustomInstall(const base::DictionaryValue& manifest, 84 bool OnCustomInstall(const base::DictionaryValue& manifest,
82 const base::FilePath& install_dir) override { 85 const base::FilePath& install_dir) override {
83 return true; 86 return true;
84 } 87 }
85 88
86 void ComponentReady(const base::Version& version, 89 void ComponentReady(const base::Version& version,
87 const base::FilePath& install_dir, 90 const base::FilePath& install_dir,
88 scoped_ptr<base::DictionaryValue> manifest) override { 91 scoped_ptr<base::DictionaryValue> manifest) override {
89 // Can't block here. This is usually the browser UI thread. 92 // Can't block here. This is usually the browser UI thread.
90 base::WorkerPool::PostTask( 93 base::WorkerPool::PostTask(
(...skipping 23 matching lines...) Expand all
114 void RegisterCAPSComponent(ComponentUpdateService* cus) { 117 void RegisterCAPSComponent(ComponentUpdateService* cus) {
115 // The component updater takes ownership of |installer|. 118 // The component updater takes ownership of |installer|.
116 scoped_ptr<ComponentInstallerTraits> traits( 119 scoped_ptr<ComponentInstallerTraits> traits(
117 new CAPSInstallerTraits()); 120 new CAPSInstallerTraits());
118 DefaultComponentInstaller* installer = 121 DefaultComponentInstaller* installer =
119 new DefaultComponentInstaller(std::move(traits)); 122 new DefaultComponentInstaller(std::move(traits));
120 installer->Register(cus, base::Closure()); 123 installer->Register(cus, base::Closure());
121 } 124 }
122 125
123 } // namespace component_updater 126 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/chrome_component_updater_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698