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

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

Issue 10683003: Moved CrxInstaller and CrxInstallerError into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest-er master Created 8 years, 5 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
« no previous file with comments | « chrome/browser/extensions/crx_file.h ('k') | chrome/browser/extensions/crx_installer.h » ('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 (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 #include "chrome/browser/extensions/crx_file.h" 5 #include "chrome/browser/extensions/crx_file.h"
6 6
7 namespace extensions {
8
7 namespace { 9 namespace {
8 10
9 // The current version of the crx format. 11 // The current version of the crx format.
10 static const uint32 kCurrentVersion = 2; 12 static const uint32 kCurrentVersion = 2;
11 13
12 // The maximum size the crx parser will tolerate for a public key. 14 // The maximum size the crx parser will tolerate for a public key.
13 static const uint32 kMaxPublicKeySize = 1 << 16; 15 static const uint32 kMaxPublicKeySize = 1 << 16;
14 16
15 // The maximum size the crx parser will tolerate for a signature. 17 // The maximum size the crx parser will tolerate for a signature.
16 static const uint32 kMaxSignatureSize = 1 << 16; 18 static const uint32 kMaxSignatureSize = 1 << 16;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 else if (header.key_size == 0) 57 else if (header.key_size == 0)
56 *error = kInvalidKeyTooSmall; 58 *error = kInvalidKeyTooSmall;
57 else if (header.signature_size > kMaxSignatureSize) 59 else if (header.signature_size > kMaxSignatureSize)
58 *error = kInvalidSignatureTooLarge; 60 *error = kInvalidSignatureTooLarge;
59 else if (header.signature_size == 0) 61 else if (header.signature_size == 0)
60 *error = kInvalidSignatureTooSmall; 62 *error = kInvalidSignatureTooSmall;
61 else 63 else
62 valid = true; 64 valid = true;
63 return valid; 65 return valid;
64 } 66 }
67
68 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_file.h ('k') | chrome/browser/extensions/crx_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698