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

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 3077022: Extension package creation cleanup (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: This would be a lot easier if I could actually compile on Windows Created 10 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
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | chrome/installer/setup/uninstall.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 Extension::~Extension() { 162 Extension::~Extension() {
163 } 163 }
164 164
165 const std::string Extension::VersionString() const { 165 const std::string Extension::VersionString() const {
166 return version_->GetString(); 166 return version_->GetString();
167 } 167 }
168 168
169 // static 169 // static
170 bool Extension::IsExtension(const FilePath& file_name) { 170 bool Extension::IsExtension(const FilePath& file_name) {
171 return file_name.MatchesExtension( 171 return file_name.MatchesExtension(chrome::kExtensionFileExtension);
172 FilePath::StringType(FILE_PATH_LITERAL(".")) +
173 chrome::kExtensionFileExtension);
174 } 172 }
175 173
176 // static 174 // static
177 bool Extension::IdIsValid(const std::string& id) { 175 bool Extension::IdIsValid(const std::string& id) {
178 // Verify that the id is legal. 176 // Verify that the id is legal.
179 if (id.size() != (kIdSize * 2)) 177 if (id.size() != (kIdSize * 2))
180 return false; 178 return false;
181 179
182 // We only support lowercase IDs, because IDs can be used as URL components 180 // We only support lowercase IDs, because IDs can be used as URL components
183 // (where GURL will lowercase it). 181 // (where GURL will lowercase it).
(...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 } else { 1757 } else {
1760 return false; 1758 return false;
1761 } 1759 }
1762 } else { 1760 } else {
1763 return true; 1761 return true;
1764 } 1762 }
1765 } 1763 }
1766 } 1764 }
1767 return false; 1765 return false;
1768 } 1766 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698