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

Side by Side Diff: base/base64url.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 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 | « base/base64url.h ('k') | base/base64url_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/base64url.h" 5 #include "base/base64url.h"
6 6
7 #include <stddef.h>
8
7 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/macros.h"
8 #include "base/numerics/safe_math.h" 11 #include "base/numerics/safe_math.h"
9 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
10 #include "third_party/modp_b64/modp_b64.h" 13 #include "third_party/modp_b64/modp_b64.h"
11 14
12 namespace base { 15 namespace base {
13 16
14 const char kPaddingChar = '='; 17 const char kPaddingChar = '=';
15 18
16 // Base64url maps {+, /} to {-, _} in order for the encoded content to be safe 19 // Base64url maps {+, /} to {-, _} in order for the encoded content to be safe
17 // to use in a URL. These characters will be translated by this implementation. 20 // to use in a URL. These characters will be translated by this implementation.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Append the necessary padding characters. 92 // Append the necessary padding characters.
90 base64_input.resize(base64_input_size.ValueOrDie(), '='); 93 base64_input.resize(base64_input_size.ValueOrDie(), '=');
91 94
92 return Base64Decode(base64_input, output); 95 return Base64Decode(base64_input, output);
93 } 96 }
94 97
95 return Base64Decode(input, output); 98 return Base64Decode(input, output);
96 } 99 }
97 100
98 } // namespace base 101 } // namespace base
OLDNEW
« no previous file with comments | « base/base64url.h ('k') | base/base64url_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698