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

Side by Side Diff: chrome/renderer/localized_error.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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
« no previous file with comments | « chrome/renderer/localized_error.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/localized_error.h" 5 #include "chrome/renderer/localized_error.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 "heading", l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_TITLE)); 700 "heading", l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_TITLE));
701 DictionaryValue* summary = new DictionaryValue; 701 DictionaryValue* summary = new DictionaryValue;
702 summary->SetString( 702 summary->SetString(
703 "msg", l10n_util::GetStringUTF16(IDS_ERRORPAGES_HTTP_POST_WARNING)); 703 "msg", l10n_util::GetStringUTF16(IDS_ERRORPAGES_HTTP_POST_WARNING));
704 error_strings->Set("summary", summary); 704 error_strings->Set("summary", summary);
705 } 705 }
706 706
707 void LocalizedError::GetAppErrorStrings( 707 void LocalizedError::GetAppErrorStrings(
708 const WebURLError& error, 708 const WebURLError& error,
709 const GURL& display_url, 709 const GURL& display_url,
710 const Extension* app, 710 const extensions::Extension* app,
711 DictionaryValue* error_strings) { 711 DictionaryValue* error_strings) {
712 DCHECK(app); 712 DCHECK(app);
713 713
714 bool rtl = LocaleIsRTL(); 714 bool rtl = LocaleIsRTL();
715 error_strings->SetString("textdirection", rtl ? "rtl" : "ltr"); 715 error_strings->SetString("textdirection", rtl ? "rtl" : "ltr");
716 716
717 string16 failed_url(ASCIIToUTF16(display_url.spec())); 717 string16 failed_url(ASCIIToUTF16(display_url.spec()));
718 // URLs are always LTR. 718 // URLs are always LTR.
719 if (rtl) 719 if (rtl)
720 base::i18n::WrapStringWithLTRFormatting(&failed_url); 720 base::i18n::WrapStringWithLTRFormatting(&failed_url);
(...skipping 12 matching lines...) Expand all
733 #if defined(OS_CHROMEOS) 733 #if defined(OS_CHROMEOS)
734 GURL learn_more_url(kAppWarningLearnMoreUrl); 734 GURL learn_more_url(kAppWarningLearnMoreUrl);
735 DictionaryValue* suggest_learn_more = new DictionaryValue(); 735 DictionaryValue* suggest_learn_more = new DictionaryValue();
736 suggest_learn_more->SetString("msg", 736 suggest_learn_more->SetString("msg",
737 l10n_util::GetStringUTF16( 737 l10n_util::GetStringUTF16(
738 IDS_ERRORPAGES_SUGGESTION_LEARNMORE)); 738 IDS_ERRORPAGES_SUGGESTION_LEARNMORE));
739 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec()); 739 suggest_learn_more->SetString("learnMoreUrl", learn_more_url.spec());
740 error_strings->Set("suggestionsLearnMore", suggest_learn_more); 740 error_strings->Set("suggestionsLearnMore", suggest_learn_more);
741 #endif // defined(OS_CHROMEOS) 741 #endif // defined(OS_CHROMEOS)
742 } 742 }
OLDNEW
« no previous file with comments | « chrome/renderer/localized_error.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698