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

Side by Side Diff: chrome/common/safe_browsing/file_type_policies.h

Issue 1986403002: Component updater for FileTypePolicies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replace_download_ext
Patch Set: Fix test's enum check Created 4 years, 6 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 | « chrome/chrome_browser.gypi ('k') | chrome/common/safe_browsing/file_type_policies.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 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 #ifndef CHROME_COMMON_SAFE_BROWSING_FILE_TYPE_POLICIES_H_ 5 #ifndef CHROME_COMMON_SAFE_BROWSING_FILE_TYPE_POLICIES_H_
6 #define CHROME_COMMON_SAFE_BROWSING_FILE_TYPE_POLICIES_H_ 6 #define CHROME_COMMON_SAFE_BROWSING_FILE_TYPE_POLICIES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Used in metrics, do not reorder. 80 // Used in metrics, do not reorder.
81 enum class UpdateResult { 81 enum class UpdateResult {
82 SUCCESS = 1, 82 SUCCESS = 1,
83 FAILED_EMPTY = 2, 83 FAILED_EMPTY = 2,
84 FAILED_PROTO_PARSE = 3, 84 FAILED_PROTO_PARSE = 3,
85 FAILED_DELTA_CHECK = 4, 85 FAILED_DELTA_CHECK = 4,
86 FAILED_VERSION_CHECK = 5, 86 FAILED_VERSION_CHECK = 5,
87 FAILED_DEFAULT_SETTING_SET = 6, 87 FAILED_DEFAULT_SETTING_SET = 6,
88 FAILED_WRONG_SETTINGS_COUNT = 7, 88 FAILED_WRONG_SETTINGS_COUNT = 7,
89 SKIPPED_VERSION_CHECK_EQUAL = 8,
89 }; 90 };
90 91
91 // Read data from an serialized protobuf and update the internal list 92 // Read data from an serialized protobuf and update the internal list
92 // only if it passes integrity checks. 93 // only if it passes integrity checks.
93 virtual UpdateResult PopulateFromBinaryPb(const std::string& binary_pb); 94 virtual UpdateResult PopulateFromBinaryPb(const std::string& binary_pb);
94 95
95 // Fetch the blob from the main resource bundle. 96 // Fetch the blob from the main resource bundle.
96 virtual void ReadResourceBundle(std::string* binary_pb); 97 virtual void ReadResourceBundle(std::string* binary_pb);
97 98
98 // Record the result of an update attempt. 99 // Record the result of an update attempt.
(...skipping 30 matching lines...) Expand all
129 FRIEND_TEST_ALL_PREFIXES(FileTypePoliciesTest, UnpackResourceBundle); 130 FRIEND_TEST_ALL_PREFIXES(FileTypePoliciesTest, UnpackResourceBundle);
130 FRIEND_TEST_ALL_PREFIXES(FileTypePoliciesTest, BadProto); 131 FRIEND_TEST_ALL_PREFIXES(FileTypePoliciesTest, BadProto);
131 FRIEND_TEST_ALL_PREFIXES(FileTypePoliciesTest, BadUpdateFromExisting); 132 FRIEND_TEST_ALL_PREFIXES(FileTypePoliciesTest, BadUpdateFromExisting);
132 133
133 friend struct FileTypePoliciesSingletonTrait; 134 friend struct FileTypePoliciesSingletonTrait;
134 }; 135 };
135 136
136 } // namespace safe_browsing 137 } // namespace safe_browsing
137 138
138 #endif // CHROME_COMMON_SAFE_BROWSING_FILE_TYPE_POLICIES_H_ 139 #endif // CHROME_COMMON_SAFE_BROWSING_FILE_TYPE_POLICIES_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/safe_browsing/file_type_policies.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698