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

Side by Side Diff: trunk/src/extensions/common/extension.cc

Issue 101113004: Revert 239759 "The comment in base64.h implies that base::Base64..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "extensions/common/extension.h" 5 #include "extensions/common/extension.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 if (working.length() == 0) 241 if (working.length() == 0)
242 return false; 242 return false;
243 } 243 }
244 244
245 return base::Base64Decode(working, output); 245 return base::Base64Decode(working, output);
246 } 246 }
247 247
248 // static 248 // static
249 bool Extension::ProducePEM(const std::string& input, std::string* output) { 249 bool Extension::ProducePEM(const std::string& input, std::string* output) {
250 DCHECK(output); 250 DCHECK(output);
251 if (input.empty()) 251 return (input.length() == 0) ? false : base::Base64Encode(input, output);
252 return false;
253 base::Base64Encode(input, output);
254 return true;
255 } 252 }
256 253
257 // static 254 // static
258 bool Extension::FormatPEMForFileOutput(const std::string& input, 255 bool Extension::FormatPEMForFileOutput(const std::string& input,
259 std::string* output, 256 std::string* output,
260 bool is_public) { 257 bool is_public) {
261 DCHECK(output); 258 DCHECK(output);
262 if (input.length() == 0) 259 if (input.length() == 0)
263 return false; 260 return false;
264 *output = ""; 261 *output = "";
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 784
788 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 785 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
789 const Extension* extension, 786 const Extension* extension,
790 const PermissionSet* permissions, 787 const PermissionSet* permissions,
791 Reason reason) 788 Reason reason)
792 : reason(reason), 789 : reason(reason),
793 extension(extension), 790 extension(extension),
794 permissions(permissions) {} 791 permissions(permissions) {}
795 792
796 } // namespace extensions 793 } // namespace extensions
OLDNEW
« no previous file with comments | « trunk/src/content/shell/renderer/webkit_test_runner.cc ('k') | trunk/src/google_apis/cup/client_update_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698