summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/snippet.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/history/snippet.cc')
-rw-r--r--chrome/browser/history/snippet.cc11
1 files changed, 11 insertions, 0 deletions
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 @@ void Snippet::ConvertMatchPositionsToWide(
}
}
+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 @@ void Snippet::ComputeSnippet(const MatchPositions& match_positions,
utext_close(document_utext);
swap(text_, snippet);
}
+
+void Snippet::Swap(Snippet* other) {
+ text_.swap(other->text_);
+ matches_.swap(other->matches_);
+}