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

Side by Side Diff: extensions/browser/updater/extension_downloader_delegate.h

Issue 829583002: Validate hash_sha256 checksum on .crx update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add histogram description. Created 5 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ 5 #ifndef EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_
6 #define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ 6 #define EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 Error error, 77 Error error,
78 const PingResult& ping_result, 78 const PingResult& ping_result,
79 const std::set<int>& request_ids); 79 const std::set<int>& request_ids);
80 80
81 // Invoked if the extension had an update available and its crx was 81 // Invoked if the extension had an update available and its crx was
82 // successfully downloaded to |path|. |ownership_passed| is true if delegate 82 // successfully downloaded to |path|. |ownership_passed| is true if delegate
83 // should get ownership of the file. 83 // should get ownership of the file.
84 virtual void OnExtensionDownloadFinished( 84 virtual void OnExtensionDownloadFinished(
85 const std::string& id, 85 const std::string& id,
86 const base::FilePath& path, 86 const base::FilePath& path,
87 const std::string& hash,
87 bool file_ownership_passed, 88 bool file_ownership_passed,
88 const GURL& download_url, 89 const GURL& download_url,
89 const std::string& version, 90 const std::string& version,
90 const PingResult& ping_result, 91 const PingResult& ping_result,
91 const std::set<int>& request_ids) = 0; 92 const std::set<int>& request_ids) = 0;
92 93
93 // The remaining methods are used by the ExtensionDownloader to retrieve 94 // The remaining methods are used by the ExtensionDownloader to retrieve
94 // information about extensions from the delegate. 95 // information about extensions from the delegate.
95 96
96 // Invoked to fill the PingData for the given extension id. Returns false 97 // Invoked to fill the PingData for the given extension id. Returns false
(...skipping 18 matching lines...) Expand all
115 // Determines if a given extension should be forced to update and (if so) 116 // Determines if a given extension should be forced to update and (if so)
116 // what the source of this forcing is (i.e. what string will be passed 117 // what the source of this forcing is (i.e. what string will be passed
117 // in |installsource| as part of the update query parameters). The default 118 // in |installsource| as part of the update query parameters). The default
118 // implementation always returns |false|. 119 // implementation always returns |false|.
119 virtual bool ShouldForceUpdate(const std::string& id, std::string* source); 120 virtual bool ShouldForceUpdate(const std::string& id, std::string* source);
120 }; 121 };
121 122
122 } // namespace extensions 123 } // namespace extensions
123 124
124 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_ 125 #endif // EXTENSIONS_BROWSER_UPDATER_EXTENSION_DOWNLOADER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698