| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/l10n_util.h" |
| 7 #include "base/logging.h" | 8 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 9 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/rlz/rlz.h" | 11 #include "chrome/browser/rlz/rlz.h" |
| 11 #include "chrome/browser/google_url_tracker.h" | 12 #include "chrome/browser/google_url_tracker.h" |
| 12 #include "chrome/browser/search_engines/template_url_model.h" | 13 #include "chrome/browser/search_engines/template_url_model.h" |
| 13 #include "chrome/common/gfx/favicon_size.h" | 14 #include "chrome/common/gfx/favicon_size.h" |
| 14 #include "chrome/common/l10n_util.h" | |
| 15 #include "net/base/escape.h" | 15 #include "net/base/escape.h" |
| 16 | 16 |
| 17 // The TemplateURLRef has any number of terms that need to be replaced. Each of | 17 // The TemplateURLRef has any number of terms that need to be replaced. Each of |
| 18 // the terms is enclosed in braces. If the character preceeding the final | 18 // the terms is enclosed in braces. If the character preceeding the final |
| 19 // brace is a ?, it indicates the term is optional and can be replaced with | 19 // brace is a ?, it indicates the term is optional and can be replaced with |
| 20 // an empty string. | 20 // an empty string. |
| 21 static const wchar_t kStartParameter = '{'; | 21 static const wchar_t kStartParameter = '{'; |
| 22 static const wchar_t kEndParameter = '}'; | 22 static const wchar_t kEndParameter = '}'; |
| 23 static const wchar_t kOptional = '?'; | 23 static const wchar_t kOptional = '?'; |
| 24 | 24 |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 566 } |
| 567 return GURL(); | 567 return GURL(); |
| 568 } | 568 } |
| 569 | 569 |
| 570 void TemplateURL::InvalidateCachedValues() const { | 570 void TemplateURL::InvalidateCachedValues() const { |
| 571 url_.InvalidateCachedValues(); | 571 url_.InvalidateCachedValues(); |
| 572 suggestions_url_.InvalidateCachedValues(); | 572 suggestions_url_.InvalidateCachedValues(); |
| 573 if (autogenerate_keyword_) | 573 if (autogenerate_keyword_) |
| 574 keyword_.clear(); | 574 keyword_.clear(); |
| 575 } | 575 } |
| OLD | NEW |