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

Side by Side Diff: chrome/browser/extensions/install_signer.cc

Issue 137893021: Make sure to initialize a boolean in ExtensionSettingsHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added histogram for count of unverified ids Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698