 Chromium Code Reviews
 Chromium Code Reviews Issue 1899433002:
  Update flags used by offline pages and bookmarks  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1899433002:
  Update flags used by offline pages and bookmarks  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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 "components/error_page/common/localized_error.h" | 5 #include "components/error_page/common/localized_error.h" | 
| 6 | 6 | 
| 7 #include <stddef.h> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" | 
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1056 error_strings->Set("showSavedCopyButton", show_saved_copy_button); | 1056 error_strings->Set("showSavedCopyButton", show_saved_copy_button); | 
| 1057 } | 1057 } | 
| 1058 | 1058 | 
| 1059 #if defined(OS_ANDROID) | 1059 #if defined(OS_ANDROID) | 
| 1060 // Offline button will not be provided when we want to show something in the | 1060 // Offline button will not be provided when we want to show something in the | 
| 1061 // cache. | 1061 // cache. | 
| 1062 if (!show_saved_copy_visible && has_offline_pages) { | 1062 if (!show_saved_copy_visible && has_offline_pages) { | 
| 1063 base::DictionaryValue* show_offline_pages_button = | 1063 base::DictionaryValue* show_offline_pages_button = | 
| 1064 new base::DictionaryValue; | 1064 new base::DictionaryValue; | 
| 1065 base::string16 button_text = l10n_util::GetStringUTF16( | 1065 base::string16 button_text = l10n_util::GetStringUTF16( | 
| 1066 offline_pages::GetOfflinePageFeatureMode() == | 1066 IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_PAGES_AS_BOOKMARKS); | 
| 
fgorski
2016/04/18 17:09:37
I am not sure if we still want to point the users
 
jianli
2016/04/18 21:17:00
I will do it in a separate patch to hide/remove of
 | |
| 1067 offline_pages::FeatureMode::ENABLED_AS_BOOKMARKS | |
| 1068 ? IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_PAGES_AS_BOOKMARKS | |
| 1069 : IDS_ERRORPAGES_BUTTON_SHOW_OFFLINE_PAGES); | |
| 1070 show_offline_pages_button->SetString("msg", button_text); | 1067 show_offline_pages_button->SetString("msg", button_text); | 
| 1071 error_strings->Set("showOfflinePagesButton", show_offline_pages_button); | 1068 error_strings->Set("showOfflinePagesButton", show_offline_pages_button); | 
| 1072 } | 1069 } | 
| 1073 #endif // defined(OS_ANDROID) | 1070 #endif // defined(OS_ANDROID) | 
| 1074 | 1071 | 
| 1075 #if defined(OS_CHROMEOS) | 1072 #if defined(OS_CHROMEOS) | 
| 1076 // ChromeOS has its own diagnostics extension, which doesn't rely on a | 1073 // ChromeOS has its own diagnostics extension, which doesn't rely on a | 
| 1077 // browser-initiated dialog. | 1074 // browser-initiated dialog. | 
| 1078 can_show_network_diagnostics_dialog = true; | 1075 can_show_network_diagnostics_dialog = true; | 
| 1079 #endif | 1076 #endif | 
| (...skipping 17 matching lines...) Expand all Loading... | |
| 1097 | 1094 | 
| 1098 bool LocalizedError::HasStrings(const std::string& error_domain, | 1095 bool LocalizedError::HasStrings(const std::string& error_domain, | 
| 1099 int error_code) { | 1096 int error_code) { | 
| 1100 // Whether or not the there are strings for an error does not depend on | 1097 // Whether or not the there are strings for an error does not depend on | 
| 1101 // whether or not the page was be generated by a POST, so just claim it was | 1098 // whether or not the page was be generated by a POST, so just claim it was | 
| 1102 // not. | 1099 // not. | 
| 1103 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr; | 1100 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr; | 
| 1104 } | 1101 } | 
| 1105 | 1102 | 
| 1106 } // namespace error_page | 1103 } // namespace error_page | 
| OLD | NEW |