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/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: 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 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 "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "components/omaha_client/omaha_query_params.h" 8 #include "components/omaha_client/omaha_query_params.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "extensions/browser/updater/extension_downloader.h" 10 #include "extensions/browser/updater/extension_downloader.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const PingResult& ping, 46 const PingResult& ping,
47 const std::set<int>& request_ids) { 47 const std::set<int>& request_ids) {
48 auto callback = download_callback_; 48 auto callback = download_callback_;
49 download_callback_.Reset(); 49 download_callback_.Reset();
50 callback.Run(false); 50 callback.Run(false);
51 } 51 }
52 52
53 void UpdateService::OnExtensionDownloadFinished( 53 void UpdateService::OnExtensionDownloadFinished(
54 const std::string& id, 54 const std::string& id,
55 const base::FilePath& path, 55 const base::FilePath& path,
56 const std::string& hash,
56 bool file_ownership_passed, 57 bool file_ownership_passed,
57 const GURL& download_url, 58 const GURL& download_url,
58 const std::string& version, 59 const std::string& version,
59 const PingResult& ping, 60 const PingResult& ping,
60 const std::set<int>& request_id) { 61 const std::set<int>& request_id) {
61 // TODO(rockot): Actually unpack and install the CRX. 62 // TODO(rockot): Actually unpack and install the CRX.
62 auto callback = download_callback_; 63 auto callback = download_callback_;
63 download_callback_.Reset(); 64 download_callback_.Reset();
64 callback.Run(true); 65 callback.Run(true);
65 } 66 }
66 67
67 bool UpdateService::IsExtensionPending(const std::string& id) { 68 bool UpdateService::IsExtensionPending(const std::string& id) {
68 // TODO(rockot): Implement this. For now all IDs are "pending". 69 // TODO(rockot): Implement this. For now all IDs are "pending".
69 return true; 70 return true;
70 } 71 }
71 72
72 bool UpdateService::GetExtensionExistingVersion(const std::string& id, 73 bool UpdateService::GetExtensionExistingVersion(const std::string& id,
73 std::string* version) { 74 std::string* version) {
74 // TODO(rockot): Implement this. 75 // TODO(rockot): Implement this.
75 return false; 76 return false;
76 } 77 }
77 78
78 } // namespace extensions 79 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698