diff options
author | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 03:17:56 +0000 |
---|---|---|
committer | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 03:17:56 +0000 |
commit | c615d1c3847902b3e792b85f97c5f1f0231aeee9 (patch) | |
tree | 34432c5c4fad2a418096c7a1335666f5a89cb354 /chrome/browser/intents | |
parent | 9ed435aa2d89da4dc1b0abfe622eab17780dc7ec (diff) | |
download | chromium_src-c615d1c3847902b3e792b85f97c5f1f0231aeee9.zip chromium_src-c615d1c3847902b3e792b85f97c5f1f0231aeee9.tar.gz chromium_src-c615d1c3847902b3e792b85f97c5f1f0231aeee9.tar.bz2 |
Return title for web_intents_table queries
BUG=none
TEST=WebIntentsTableTest.*
Review URL: http://codereview.chromium.org/7660006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/intents')
-rw-r--r-- | chrome/browser/intents/web_intent_data.cc | 15 | ||||
-rw-r--r-- | chrome/browser/intents/web_intent_data.h | 4 |
2 files changed, 18 insertions, 1 deletions
diff --git a/chrome/browser/intents/web_intent_data.cc b/chrome/browser/intents/web_intent_data.cc index 3f7339f..1cf25f2 100644 --- a/chrome/browser/intents/web_intent_data.cc +++ b/chrome/browser/intents/web_intent_data.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/utf_string_conversions.h" #include "chrome/browser/intents/web_intent_data.h" +#include <iostream> WebIntentData::WebIntentData() {} @@ -11,5 +13,16 @@ WebIntentData::~WebIntentData() {} bool WebIntentData::operator==(const WebIntentData& other) const { return (service_url == other.service_url && action == other.action && - type == other.type); + type == other.type && + title == other.title); +} + +std::ostream& operator<<(::std::ostream& os, + const WebIntentData& intent) { + return os << + "{" << intent.service_url << + ", " << UTF16ToUTF8(intent.action) << + ", " << UTF16ToUTF8(intent.type) << + ", " << UTF16ToUTF8(intent.title) << + "}"; } diff --git a/chrome/browser/intents/web_intent_data.h b/chrome/browser/intents/web_intent_data.h index b920e7c..6792149 100644 --- a/chrome/browser/intents/web_intent_data.h +++ b/chrome/browser/intents/web_intent_data.h @@ -8,6 +8,7 @@ #include "base/string16.h" #include "googleurl/src/gurl.h" +#include <iosfwd> // Describes the relevant elements of a WebIntent. struct WebIntentData { @@ -22,4 +23,7 @@ struct WebIntentData { string16 title; // The title of the service. }; +// Printing operator - helps gtest produce readable error messages. +std::ostream& operator<<(std::ostream& os, const WebIntentData& intent); + #endif // CHROME_BROWSER_INTENTS_WEB_INTENT_DATA_H_ |