| 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/gfx/favicon_size.h" | 7 #include "app/gfx/favicon_size.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 case GOOGLE_UNESCAPED_SEARCH_TERMS: { | 310 case GOOGLE_UNESCAPED_SEARCH_TERMS: { |
| 311 std::string unescaped_terms; | 311 std::string unescaped_terms; |
| 312 WideToCodepage(terms, WideToASCII(input_encoding).c_str(), | 312 WideToCodepage(terms, WideToASCII(input_encoding).c_str(), |
| 313 OnStringUtilConversionError::SKIP, &unescaped_terms); | 313 OnStringUtilConversionError::SKIP, &unescaped_terms); |
| 314 url.insert(i->index, std::wstring(unescaped_terms.begin(), | 314 url.insert(i->index, std::wstring(unescaped_terms.begin(), |
| 315 unescaped_terms.end())); | 315 unescaped_terms.end())); |
| 316 break; | 316 break; |
| 317 } | 317 } |
| 318 | 318 |
| 319 case LANGUAGE: | 319 case LANGUAGE: |
| 320 url.insert(i->index, g_browser_process->GetApplicationLocale()); | 320 url.insert(i->index, |
| 321 ASCIIToWide(g_browser_process->GetApplicationLocale())); |
| 321 break; | 322 break; |
| 322 | 323 |
| 323 case SEARCH_TERMS: | 324 case SEARCH_TERMS: |
| 324 url.insert(i->index, encoded_terms); | 325 url.insert(i->index, encoded_terms); |
| 325 break; | 326 break; |
| 326 | 327 |
| 327 default: | 328 default: |
| 328 NOTREACHED(); | 329 NOTREACHED(); |
| 329 break; | 330 break; |
| 330 } | 331 } |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 567 } |
| 567 return GURL(); | 568 return GURL(); |
| 568 } | 569 } |
| 569 | 570 |
| 570 void TemplateURL::InvalidateCachedValues() const { | 571 void TemplateURL::InvalidateCachedValues() const { |
| 571 url_.InvalidateCachedValues(); | 572 url_.InvalidateCachedValues(); |
| 572 suggestions_url_.InvalidateCachedValues(); | 573 suggestions_url_.InvalidateCachedValues(); |
| 573 if (autogenerate_keyword_) | 574 if (autogenerate_keyword_) |
| 574 keyword_.clear(); | 575 keyword_.clear(); |
| 575 } | 576 } |
| OLD | NEW |