| OLD | NEW |
| 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/common/localized_error.h" | 5 #include "chrome/common/localized_error.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 error_code); | 479 error_code); |
| 480 DCHECK(map); | 480 DCHECK(map); |
| 481 return map; | 481 return map; |
| 482 } else { | 482 } else { |
| 483 NOTREACHED(); | 483 NOTREACHED(); |
| 484 return NULL; | 484 return NULL; |
| 485 } | 485 } |
| 486 } | 486 } |
| 487 | 487 |
| 488 // Returns a dictionary containing the strings for the settings menu under the | 488 // Returns a dictionary containing the strings for the settings menu under the |
| 489 // wrench, and the advanced settings button. | 489 // app menu, and the advanced settings button. |
| 490 base::DictionaryValue* GetStandardMenuItemsText() { | 490 base::DictionaryValue* GetStandardMenuItemsText() { |
| 491 base::DictionaryValue* standard_menu_items_text = new base::DictionaryValue(); | 491 base::DictionaryValue* standard_menu_items_text = new base::DictionaryValue(); |
| 492 standard_menu_items_text->SetString("settingsTitle", | 492 standard_menu_items_text->SetString("settingsTitle", |
| 493 l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE)); | 493 l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE)); |
| 494 standard_menu_items_text->SetString("advancedTitle", | 494 standard_menu_items_text->SetString("advancedTitle", |
| 495 l10n_util::GetStringUTF16(IDS_SETTINGS_SHOW_ADVANCED_SETTINGS)); | 495 l10n_util::GetStringUTF16(IDS_SETTINGS_SHOW_ADVANCED_SETTINGS)); |
| 496 return standard_menu_items_text; | 496 return standard_menu_items_text; |
| 497 } | 497 } |
| 498 | 498 |
| 499 // Gets the icon class for a given |error_domain| and |error_code|. | 499 // Gets the icon class for a given |error_domain| and |error_code|. |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 return l10n_util::GetStringUTF16(IDS_ERRORPAGES_DETAILS_UNKNOWN); | 931 return l10n_util::GetStringUTF16(IDS_ERRORPAGES_DETAILS_UNKNOWN); |
| 932 } | 932 } |
| 933 | 933 |
| 934 bool LocalizedError::HasStrings(const std::string& error_domain, | 934 bool LocalizedError::HasStrings(const std::string& error_domain, |
| 935 int error_code) { | 935 int error_code) { |
| 936 // Whether or not the there are strings for an error does not depend on | 936 // Whether or not the there are strings for an error does not depend on |
| 937 // whether or not the page was be generated by a POST, so just claim it was | 937 // whether or not the page was be generated by a POST, so just claim it was |
| 938 // not. | 938 // not. |
| 939 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != NULL; | 939 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != NULL; |
| 940 } | 940 } |
| OLD | NEW |