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

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

Issue 2154773002: Implement Just-In-Time Flash updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git pull && gclient sync Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/sth_set_component_installer.h" 5 #include "chrome/browser/component_updater/sth_set_component_installer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 std::string STHSetComponentInstallerTraits::GetName() const { 100 std::string STHSetComponentInstallerTraits::GetName() const {
101 return kSTHSetFetcherManifestName; 101 return kSTHSetFetcherManifestName;
102 } 102 }
103 103
104 update_client::InstallerAttributes 104 update_client::InstallerAttributes
105 STHSetComponentInstallerTraits::GetInstallerAttributes() const { 105 STHSetComponentInstallerTraits::GetInstallerAttributes() const {
106 return update_client::InstallerAttributes(); 106 return update_client::InstallerAttributes();
107 } 107 }
108 108
109 std::vector<std::string> STHSetComponentInstallerTraits::GetMimeTypes() const {
110 return std::vector<std::string>();
111 }
112
109 void STHSetComponentInstallerTraits::LoadSTHsFromDisk( 113 void STHSetComponentInstallerTraits::LoadSTHsFromDisk(
110 const base::FilePath& sths_path, 114 const base::FilePath& sths_path,
111 const base::Version& version) { 115 const base::Version& version) {
112 if (sths_path.empty()) 116 if (sths_path.empty())
113 return; 117 return;
114 118
115 base::FileEnumerator sth_file_enumerator(sths_path, false, 119 base::FileEnumerator sth_file_enumerator(sths_path, false,
116 base::FileEnumerator::FILES, 120 base::FileEnumerator::FILES,
117 FILE_PATH_LITERAL("*.sth")); 121 FILE_PATH_LITERAL("*.sth"));
118 base::FilePath sth_file_path; 122 base::FilePath sth_file_path;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 200
197 std::unique_ptr<ComponentInstallerTraits> traits( 201 std::unique_ptr<ComponentInstallerTraits> traits(
198 new STHSetComponentInstallerTraits(distributor)); 202 new STHSetComponentInstallerTraits(distributor));
199 // |cus| will take ownership of |installer| during installer->Register(cus). 203 // |cus| will take ownership of |installer| during installer->Register(cus).
200 DefaultComponentInstaller* installer = 204 DefaultComponentInstaller* installer =
201 new DefaultComponentInstaller(std::move(traits)); 205 new DefaultComponentInstaller(std::move(traits));
202 installer->Register(cus, base::Closure()); 206 installer->Register(cus, base::Closure());
203 } 207 }
204 208
205 } // namespace component_updater 209 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698