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

Side by Side Diff: extensions/browser/updater/update_service.cc

Issue 829583002: Validate hash_sha256 checksum on .crx update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix histogram value. Created 5 years, 10 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 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 #include "extensions/browser/updater/update_service.h" 5 #include "extensions/browser/updater/update_service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "components/update_client/update_query_params.h" 10 #include "components/update_client/update_query_params.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const std::string& id, 46 const std::string& id,
47 Error error, 47 Error error,
48 const PingResult& ping, 48 const PingResult& ping,
49 const std::set<int>& request_ids) { 49 const std::set<int>& request_ids) {
50 auto callback = download_callback_; 50 auto callback = download_callback_;
51 download_callback_.Reset(); 51 download_callback_.Reset();
52 callback.Run(false); 52 callback.Run(false);
53 } 53 }
54 54
55 void UpdateService::OnExtensionDownloadFinished( 55 void UpdateService::OnExtensionDownloadFinished(
56 const std::string& id, 56 const CRXFileInfo& file,
57 const base::FilePath& path,
58 bool file_ownership_passed, 57 bool file_ownership_passed,
59 const GURL& download_url, 58 const GURL& download_url,
60 const std::string& version, 59 const std::string& version,
61 const PingResult& ping, 60 const PingResult& ping,
62 const std::set<int>& request_id) { 61 const std::set<int>& request_id) {
63 // TODO(rockot): Actually unpack and install the CRX. 62 // TODO(rockot): Actually unpack and install the CRX.
64 auto callback = download_callback_; 63 auto callback = download_callback_;
65 download_callback_.Reset(); 64 download_callback_.Reset();
66 callback.Run(true); 65 callback.Run(true);
67 } 66 }
68 67
69 bool UpdateService::IsExtensionPending(const std::string& id) { 68 bool UpdateService::IsExtensionPending(const std::string& id) {
70 // TODO(rockot): Implement this. For now all IDs are "pending". 69 // TODO(rockot): Implement this. For now all IDs are "pending".
71 return true; 70 return true;
72 } 71 }
73 72
74 bool UpdateService::GetExtensionExistingVersion(const std::string& id, 73 bool UpdateService::GetExtensionExistingVersion(const std::string& id,
75 std::string* version) { 74 std::string* version) {
76 // TODO(rockot): Implement this. 75 // TODO(rockot): Implement this.
77 return false; 76 return false;
78 } 77 }
79 78
80 } // namespace extensions 79 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698