summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/search_engines')
-rw-r--r--chrome/browser/search_engines/template_url.cc30
-rw-r--r--chrome/browser/search_engines/template_url.h25
2 files changed, 35 insertions, 20 deletions
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc
index a289826f..98d80fb 100644
--- a/chrome/browser/search_engines/template_url.cc
+++ b/chrome/browser/search_engines/template_url.cc
@@ -79,6 +79,17 @@ TemplateURLRef::TemplateURLRef() {
Set(std::string(), 0, 0);
}
+TemplateURLRef::TemplateURLRef(const std::string& url,
+ int index_offset,
+ int page_offset)
+ : url_(url),
+ index_offset_(index_offset),
+ page_offset_(page_offset),
+ parsed_(false),
+ valid_(false),
+ supports_replacements_(false) {
+}
+
void TemplateURLRef::Set(const std::string& url,
int index_offset,
int page_offset) {
@@ -88,6 +99,9 @@ void TemplateURLRef::Set(const std::string& url,
InvalidateCachedValues();
}
+TemplateURLRef::~TemplateURLRef() {
+}
+
bool TemplateURLRef::ParseParameter(size_t start,
size_t end,
std::string* url,
@@ -555,6 +569,22 @@ bool TemplateURL::SupportsReplacement(const TemplateURL* turl) {
return turl && turl->url() && turl->url()->SupportsReplacement();
}
+TemplateURL::TemplateURL()
+ : autogenerate_keyword_(false),
+ keyword_generated_(false),
+ show_in_default_list_(false),
+ safe_for_autoreplace_(false),
+ id_(0),
+ date_created_(base::Time::Now()),
+ usage_count_(0),
+ search_engine_type_(TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER),
+ logo_id_(0),
+ prepopulate_id_(0) {
+}
+
+TemplateURL::~TemplateURL() {
+}
+
std::wstring TemplateURL::AdjustedShortNameForLocaleDirection() const {
std::wstring bidi_safe_short_name;
if (base::i18n::AdjustStringForLocaleDirection(short_name_,
diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h
index 584626b..fbcdd8b 100644
--- a/chrome/browser/search_engines/template_url.h
+++ b/chrome/browser/search_engines/template_url.h
@@ -49,14 +49,9 @@ class TemplateURLRef {
TemplateURLRef();
- TemplateURLRef(const std::string& url, int index_offset, int page_offset)
- : url_(url),
- index_offset_(index_offset),
- page_offset_(page_offset),
- parsed_(false),
- valid_(false),
- supports_replacements_(false) {
- }
+ TemplateURLRef(const std::string& url, int index_offset, int page_offset);
+
+ ~TemplateURLRef();
// Returns true if this URL supports replacement.
bool SupportsReplacement() const;
@@ -270,18 +265,8 @@ class TemplateURL {
// replacement.
static bool SupportsReplacement(const TemplateURL* turl);
- TemplateURL()
- : autogenerate_keyword_(false),
- keyword_generated_(false),
- show_in_default_list_(false),
- safe_for_autoreplace_(false),
- id_(0),
- date_created_(base::Time::Now()),
- usage_count_(0),
- search_engine_type_(TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER),
- logo_id_(0),
- prepopulate_id_(0) {}
- ~TemplateURL() {}
+ TemplateURL();
+ ~TemplateURL();
// A short description of the template. This is the name we show to the user
// in various places that use keywords. For example, the location bar shows