FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs.
Cuts ~2MB off our .a files (Debug, Linux). Also added the "virtual" keyword on
a whole bunch of virtual dtors that were missing it.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3522004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61100 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/history/snippet.cc b/chrome/browser/history/snippet.cc
index 6e3e93c..47c11c3 100644
--- a/chrome/browser/history/snippet.cc
+++ b/chrome/browser/history/snippet.cc
@@ -200,6 +200,12 @@
}
}
+Snippet::Snippet() {
+}
+
+Snippet::~Snippet() {
+}
+
void Snippet::ComputeSnippet(const MatchPositions& match_positions,
const std::string& document) {
// The length of snippets we try to produce.
@@ -284,3 +290,8 @@
utext_close(document_utext);
swap(text_, snippet);
}
+
+void Snippet::Swap(Snippet* other) {
+ text_.swap(other->text_);
+ matches_.swap(other->matches_);
+}