OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/install_signer.h" | 5 #include "chrome/browser/extensions/install_signer.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 376 |
377 scoped_ptr<InstallSignature> result; | 377 scoped_ptr<InstallSignature> result; |
378 if (!signature.empty()) { | 378 if (!signature.empty()) { |
379 result.reset(new InstallSignature); | 379 result.reset(new InstallSignature); |
380 result->ids = valid_ids; | 380 result->ids = valid_ids; |
381 result->salt = salt_; | 381 result->salt = salt_; |
382 result->signature = signature; | 382 result->signature = signature; |
383 result->expire_date = expire_date; | 383 result->expire_date = expire_date; |
384 bool verified = VerifySignature(*result); | 384 bool verified = VerifySignature(*result); |
385 UMA_HISTOGRAM_BOOLEAN("ExtensionInstallSigner.ResultWasValid", verified); | 385 UMA_HISTOGRAM_BOOLEAN("ExtensionInstallSigner.ResultWasValid", verified); |
| 386 UMA_HISTOGRAM_COUNTS_100("ExtensionInstallSigner.InvalidCount", |
| 387 invalid_ids.size()); |
386 if (!verified) | 388 if (!verified) |
387 result.reset(); | 389 result.reset(); |
388 } | 390 } |
389 | 391 |
390 if (!callback_.is_null()) | 392 if (!callback_.is_null()) |
391 callback_.Run(result.Pass()); | 393 callback_.Run(result.Pass()); |
392 } | 394 } |
393 | 395 |
394 | 396 |
395 } // namespace extensions | 397 } // namespace extensions |
OLD | NEW |