| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/search_engines/template_url.h" | 5 #include "chrome/browser/search_engines/template_url.h" |
| 6 | 6 |
| 7 #include "base/i18n/case_conversion.h" | 7 #include "base/i18n/case_conversion.h" |
| 8 #include "base/i18n/icu_string_conversions.h" | 8 #include "base/i18n/icu_string_conversions.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 turl->url()->SupportsReplacementUsingTermsData(search_terms_data); | 587 turl->url()->SupportsReplacementUsingTermsData(search_terms_data); |
| 588 } | 588 } |
| 589 | 589 |
| 590 TemplateURL::TemplateURL() | 590 TemplateURL::TemplateURL() |
| 591 : autogenerate_keyword_(false), | 591 : autogenerate_keyword_(false), |
| 592 keyword_generated_(false), | 592 keyword_generated_(false), |
| 593 show_in_default_list_(false), | 593 show_in_default_list_(false), |
| 594 safe_for_autoreplace_(false), | 594 safe_for_autoreplace_(false), |
| 595 id_(0), | 595 id_(0), |
| 596 date_created_(base::Time::Now()), | 596 date_created_(base::Time::Now()), |
| 597 last_modified_(base::Time::Now()), |
| 597 created_by_policy_(false), | 598 created_by_policy_(false), |
| 598 usage_count_(0), | 599 usage_count_(0), |
| 599 search_engine_type_(SEARCH_ENGINE_OTHER), | 600 search_engine_type_(SEARCH_ENGINE_OTHER), |
| 600 logo_id_(kNoSearchEngineLogo), | 601 logo_id_(kNoSearchEngineLogo), |
| 601 prepopulate_id_(0) { | 602 prepopulate_id_(0) { |
| 602 } | 603 } |
| 603 | 604 |
| 604 TemplateURL::~TemplateURL() { | 605 TemplateURL::~TemplateURL() { |
| 605 } | 606 } |
| 606 | 607 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 } | 695 } |
| 695 | 696 |
| 696 std::string TemplateURL::GetExtensionId() const { | 697 std::string TemplateURL::GetExtensionId() const { |
| 697 DCHECK(IsExtensionKeyword()); | 698 DCHECK(IsExtensionKeyword()); |
| 698 return GURL(url_.url()).host(); | 699 return GURL(url_.url()).host(); |
| 699 } | 700 } |
| 700 | 701 |
| 701 bool TemplateURL::IsExtensionKeyword() const { | 702 bool TemplateURL::IsExtensionKeyword() const { |
| 702 return GURL(url_.url()).SchemeIs(chrome::kExtensionScheme); | 703 return GURL(url_.url()).SchemeIs(chrome::kExtensionScheme); |
| 703 } | 704 } |
| OLD | NEW |