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

Unified Diff: chrome/browser/safe_browsing/signature_util.h

Issue 8459001: Extract the certificate to use in the download protection pingback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address Noe and Matt's comments Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/signature_util.h
===================================================================
--- chrome/browser/safe_browsing/signature_util.h (revision 108613)
+++ chrome/browser/safe_browsing/signature_util.h (working copy)
@@ -9,16 +9,31 @@
#define CHROME_BROWSER_SAFE_BROWSING_SIGNATURE_UTIL_H_
#pragma once
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+
class FilePath;
namespace safe_browsing {
-namespace signature_util {
+class ClientDownloadRequest_SignatureInfo;
-// Returns true if the given file path contains a signature. No checks are
-// performed as to the validity of the signature.
-bool IsSigned(const FilePath& file_path);
+class SignatureUtil : public base::RefCountedThreadSafe<SignatureUtil> {
+ public:
+ SignatureUtil();
-} // namespace signature_util
+ // Fills in the DownloadRequest_SignatureInfo for the given file path.
+ // This method may be called on any thread.
+ virtual void CheckSignature(
+ const FilePath& file_path,
+ ClientDownloadRequest_SignatureInfo* signature_info);
+
+ protected:
+ friend class base::RefCountedThreadSafe<SignatureUtil>;
+ virtual ~SignatureUtil();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SignatureUtil);
+};
} // namespace safe_browsing
#endif // CHROME_BROWSER_SAFE_BROWSING_SIGNATURE_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698