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

Unified Diff: webrtc/rtc_base/cryptstring.h

Issue 2877023002: Move webrtc/{base => rtc_base} (Closed)
Patch Set: update presubmit.py and DEPS include rules Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/rtc_base/criticalsection_unittest.cc ('k') | webrtc/rtc_base/cryptstring.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/cryptstring.h
diff --git a/webrtc/base/cryptstring.h b/webrtc/rtc_base/cryptstring.h
similarity index 97%
copy from webrtc/base/cryptstring.h
copy to webrtc/rtc_base/cryptstring.h
index e1ee309f65cffd9eeef95ee1483fae32ef65c656..b7b6694cf6234d188e7f6cf866e22e33d52d566e 100644
--- a/webrtc/base/cryptstring.h
+++ b/webrtc/rtc_base/cryptstring.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef _WEBRTC_BASE_CRYPTSTRING_H_
-#define _WEBRTC_BASE_CRYPTSTRING_H_
+#ifndef WEBRTC_RTC_BASE_CRYPTSTRING_H_
+#define WEBRTC_RTC_BASE_CRYPTSTRING_H_
#include <string.h>
@@ -74,7 +74,7 @@ public:
length_ = 0;
storage_[0] = 0;
}
-
+
void Append(const std::string & text) {
Append(text.data(), text.length());
}
@@ -85,7 +85,7 @@ public:
length_ += length;
storage_[length_] = '\0';
}
-
+
void Append(const CryptString * password) {
size_t len = password->GetLength();
EnsureStorage(length_ + len + 1);
@@ -121,7 +121,7 @@ public:
if (old_capacity) {
memcpy(storage_, old_storage, length_);
-
+
// zero memory in a way that an optimizer won't optimize it out
old_storage[0] = 0;
for (size_t i = 1; i < old_capacity; i++) {
@@ -129,7 +129,7 @@ public:
}
delete[] old_storage;
}
- }
+ }
~FormatCryptString() {
if (capacity_) {
@@ -164,4 +164,4 @@ class InsecureCryptStringImpl : public CryptStringImpl {
}
-#endif // _WEBRTC_BASE_CRYPTSTRING_H_
+#endif // WEBRTC_RTC_BASE_CRYPTSTRING_H_
« no previous file with comments | « webrtc/rtc_base/criticalsection_unittest.cc ('k') | webrtc/rtc_base/cryptstring.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698