summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/util
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-04 23:11:19 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-04 23:11:19 +0000
commit9b2331d912b0a15c3eef290eaa617c54a87dc68e (patch)
tree6ca5f0248ce754b74b39112c17c2d9726c004e79 /chrome/browser/sync/util
parent9f1e5d235d5bdb3a0fe626fe47f5468cddaf75e4 (diff)
downloadchromium_src-9b2331d912b0a15c3eef290eaa617c54a87dc68e.zip
chromium_src-9b2331d912b0a15c3eef290eaa617c54a87dc68e.tar.gz
chromium_src-9b2331d912b0a15c3eef290eaa617c54a87dc68e.tar.bz2
Reapply r61237: FBTF: Another big ctor/dtor cleanup found by automated tools.
Removes changes to code in webkit/ that broke chrome_frame. Will debug that portion later. (Shaves ~2MB off Linux Debug .a files) BUG=none TEST=compiles First Review URL: http://codereview.chromium.org/3563004 Review URL: http://codereview.chromium.org/3621003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/util')
-rw-r--r--chrome/browser/sync/util/crypto_helpers.cc4
-rw-r--r--chrome/browser/sync/util/crypto_helpers.h4
-rw-r--r--chrome/browser/sync/util/cryptographer.cc2
-rw-r--r--chrome/browser/sync/util/cryptographer.h1
4 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/sync/util/crypto_helpers.cc b/chrome/browser/sync/util/crypto_helpers.cc
index b01e01f..9315d8b 100644
--- a/chrome/browser/sync/util/crypto_helpers.cc
+++ b/chrome/browser/sync/util/crypto_helpers.cc
@@ -21,6 +21,8 @@ MD5Calculator::MD5Calculator() {
MD5Init(&context_);
}
+MD5Calculator::~MD5Calculator() {}
+
void MD5Calculator::AddData(const unsigned char* data, int length) {
CHECK(bin_digest_.empty());
MD5Update(&context_, data, length);
@@ -34,7 +36,7 @@ void MD5Calculator::CalcDigest() {
}
}
-vector<uint8> MD5Calculator::GetDigest() {
+const vector<uint8>& MD5Calculator::GetDigest() {
CalcDigest();
return bin_digest_;
}
diff --git a/chrome/browser/sync/util/crypto_helpers.h b/chrome/browser/sync/util/crypto_helpers.h
index 5660447..34b36f4 100644
--- a/chrome/browser/sync/util/crypto_helpers.h
+++ b/chrome/browser/sync/util/crypto_helpers.h
@@ -22,13 +22,13 @@ class MD5Calculator {
void CalcDigest();
public:
MD5Calculator();
- ~MD5Calculator() {}
+ ~MD5Calculator();
void AddData(const uint8* data, int length);
void AddData(const char* data, int length) {
AddData(reinterpret_cast<const uint8*>(data), length);
}
std::string GetHexDigest();
- std::vector<uint8> GetDigest();
+ const std::vector<uint8>& GetDigest();
private:
DISALLOW_COPY_AND_ASSIGN(MD5Calculator);
};
diff --git a/chrome/browser/sync/util/cryptographer.cc b/chrome/browser/sync/util/cryptographer.cc
index 2a3701e..747b094 100644
--- a/chrome/browser/sync/util/cryptographer.cc
+++ b/chrome/browser/sync/util/cryptographer.cc
@@ -19,6 +19,8 @@ const char kNigoriKeyName[] = "nigori-key";
Cryptographer::Cryptographer() : default_nigori_(NULL) {
}
+Cryptographer::~Cryptographer() {}
+
void Cryptographer::Bootstrap(const std::string& restored_bootstrap_token) {
if (is_ready()) {
NOTREACHED();
diff --git a/chrome/browser/sync/util/cryptographer.h b/chrome/browser/sync/util/cryptographer.h
index 230ed94..ada084cc 100644
--- a/chrome/browser/sync/util/cryptographer.h
+++ b/chrome/browser/sync/util/cryptographer.h
@@ -43,6 +43,7 @@ struct KeyParams {
class Cryptographer {
public:
Cryptographer();
+ ~Cryptographer();
// |restored_bootstrap_token| can be provided via this method to bootstrap
// Cryptographer instance into the ready state (is_ready will be true).