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

Side by Side Diff: components/crx_file/crx_file.cc

Issue 474633005: Componentize component_updater: Split crx_file code off into its own component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove shared library export Created 6 years, 4 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 | « components/crx_file/crx_file.h ('k') | extensions/DEPS » ('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 "extensions/common/crx_file.h" 5 #include "components/crx_file/crx_file.h"
6 6
7 namespace extensions { 7 namespace crx_file {
8 8
9 namespace { 9 namespace {
10 10
11 // The current version of the crx format. 11 // The current version of the crx format.
12 static const uint32 kCurrentVersion = 2; 12 static const uint32 kCurrentVersion = 2;
13 13
14 // The current version of the crx diff format. 14 // The current version of the crx diff format.
15 static const uint32 kCurrentDiffVersion = 0; 15 static const uint32 kCurrentDiffVersion = 0;
16 16
17 // The maximum size the crx parser will tolerate for a public key. 17 // The maximum size the crx parser will tolerate for a public key.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 *error = kInvalidKeyTooSmall; 71 *error = kInvalidKeyTooSmall;
72 else if (header.signature_size > kMaxSignatureSize) 72 else if (header.signature_size > kMaxSignatureSize)
73 *error = kInvalidSignatureTooLarge; 73 *error = kInvalidSignatureTooLarge;
74 else if (header.signature_size == 0) 74 else if (header.signature_size == 0)
75 *error = kInvalidSignatureTooSmall; 75 *error = kInvalidSignatureTooSmall;
76 else 76 else
77 valid = true; 77 valid = true;
78 return valid; 78 return valid;
79 } 79 }
80 80
81 } // namespace extensions 81 } // namespace crx_file
OLDNEW
« no previous file with comments | « components/crx_file/crx_file.h ('k') | extensions/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698