Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(836)

Side by Side Diff: chrome/browser/search_engines/template_url.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "app/l10n_util.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/logging.h" 10 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/google_url_tracker.h" 13 #include "chrome/browser/google_url_tracker.h"
13 #include "chrome/browser/search_engines/template_url_model.h" 14 #include "chrome/browser/search_engines/template_url_model.h"
14 #include "gfx/favicon_size.h" 15 #include "gfx/favicon_size.h"
15 #include "net/base/escape.h" 16 #include "net/base/escape.h"
16 17
17 #if defined(OS_WIN) 18 #if defined(OS_WIN)
18 #include "chrome/browser/rlz/rlz.h" 19 #include "chrome/browser/rlz/rlz.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 return url.ReplaceComponents(rep); 540 return url.ReplaceComponents(rep);
540 } 541 }
541 542
542 // static 543 // static
543 bool TemplateURL::SupportsReplacement(const TemplateURL* turl) { 544 bool TemplateURL::SupportsReplacement(const TemplateURL* turl) {
544 return turl && turl->url() && turl->url()->SupportsReplacement(); 545 return turl && turl->url() && turl->url()->SupportsReplacement();
545 } 546 }
546 547
547 std::wstring TemplateURL::AdjustedShortNameForLocaleDirection() const { 548 std::wstring TemplateURL::AdjustedShortNameForLocaleDirection() const {
548 std::wstring bidi_safe_short_name; 549 std::wstring bidi_safe_short_name;
549 if (l10n_util::AdjustStringForLocaleDirection(short_name_, 550 if (base::i18n::AdjustStringForLocaleDirection(short_name_,
550 &bidi_safe_short_name)) 551 &bidi_safe_short_name))
551 return bidi_safe_short_name; 552 return bidi_safe_short_name;
552 return short_name_; 553 return short_name_;
553 } 554 }
554 555
555 void TemplateURL::SetSuggestionsURL(const std::wstring& suggestions_url, 556 void TemplateURL::SetSuggestionsURL(const std::wstring& suggestions_url,
556 int index_offset, 557 int index_offset,
557 int page_offset) { 558 int page_offset) {
558 suggestions_url_.Set(suggestions_url, index_offset, page_offset); 559 suggestions_url_.Set(suggestions_url, index_offset, page_offset);
559 } 560 }
560 561
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 } 615 }
615 return GURL(); 616 return GURL();
616 } 617 }
617 618
618 void TemplateURL::InvalidateCachedValues() const { 619 void TemplateURL::InvalidateCachedValues() const {
619 url_.InvalidateCachedValues(); 620 url_.InvalidateCachedValues();
620 suggestions_url_.InvalidateCachedValues(); 621 suggestions_url_.InvalidateCachedValues();
621 if (autogenerate_keyword_) 622 if (autogenerate_keyword_)
622 keyword_.clear(); 623 keyword_.clear();
623 } 624 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/search_engines/template_url_table_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698