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

Side by Side Diff: components/update_client/utils.h

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 | « components/update_client/update_engine.cc ('k') | components/update_client/utils.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_UPDATE_CLIENT_UTILS_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_UTILS_H_
6 #define COMPONENTS_UPDATE_CLIENT_UTILS_H_ 6 #define COMPONENTS_UPDATE_CLIENT_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 12
12 class GURL; 13 class GURL;
13 14
14 namespace base { 15 namespace base {
15 class FilePath; 16 class FilePath;
16 } 17 }
17 18
18 namespace net { 19 namespace net {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 std::string GetCrxComponentID(const CrxComponent& component); 92 std::string GetCrxComponentID(const CrxComponent& component);
92 93
93 // Returns true if the actual SHA-256 hash of the |filepath| matches the 94 // Returns true if the actual SHA-256 hash of the |filepath| matches the
94 // |expected_hash|. 95 // |expected_hash|.
95 bool VerifyFileHash256(const base::FilePath& filepath, 96 bool VerifyFileHash256(const base::FilePath& filepath,
96 const std::string& expected_hash); 97 const std::string& expected_hash);
97 98
98 // Returns true if the |brand| parameter matches ^([a-zA-Z]{4})?$ . 99 // Returns true if the |brand| parameter matches ^([a-zA-Z]{4})?$ .
99 bool IsValidBrand(const std::string& brand); 100 bool IsValidBrand(const std::string& brand);
100 101
102 // Removes the unsecure urls in the |urls| parameter.
103 void RemoveUnsecureUrls(std::vector<GURL>* urls);
104
101 } // namespace update_client 105 } // namespace update_client
102 106
103 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ 107 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_
OLDNEW
« no previous file with comments | « components/update_client/update_engine.cc ('k') | components/update_client/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698