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

Side by Side Diff: components/error_page/common/localized_error.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Update new uses post-rebase Created 3 years, 4 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
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 "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 <utility> 9 #include <utility>
10 10
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 AddSingleEntryDictionaryToList(suggestions_summary_list, "summary", 640 AddSingleEntryDictionaryToList(suggestions_summary_list, "summary",
641 IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_SUMMARY, false); 641 IDS_ERRORPAGES_SUGGESTION_RELOAD_REPOST_SUMMARY, false);
642 return; 642 return;
643 } 643 }
644 DCHECK(!IsSuggested(suggestions, SUGGEST_REPOST_RELOAD)); 644 DCHECK(!IsSuggested(suggestions, SUGGEST_REPOST_RELOAD));
645 645
646 if (IsOnlySuggestion(suggestions, SUGGEST_NAVIGATE_TO_ORIGIN)) { 646 if (IsOnlySuggestion(suggestions, SUGGEST_NAVIGATE_TO_ORIGIN)) {
647 DCHECK(suggestions_summary_list->empty()); 647 DCHECK(suggestions_summary_list->empty());
648 DCHECK(!(suggestions & ~SUGGEST_NAVIGATE_TO_ORIGIN)); 648 DCHECK(!(suggestions & ~SUGGEST_NAVIGATE_TO_ORIGIN));
649 url::Origin failed_origin(failed_url); 649 url::Origin failed_origin(failed_url);
650 if (failed_origin.unique()) 650 if (failed_origin.opaque())
651 return; 651 return;
652 652
653 auto suggestion = base::MakeUnique<base::DictionaryValue>(); 653 auto suggestion = base::MakeUnique<base::DictionaryValue>();
654 suggestion->SetString("summary", 654 suggestion->SetString("summary",
655 l10n_util::GetStringUTF16( 655 l10n_util::GetStringUTF16(
656 IDS_ERRORPAGES_SUGGESTION_NAVIGATE_TO_ORIGIN)); 656 IDS_ERRORPAGES_SUGGESTION_NAVIGATE_TO_ORIGIN));
657 suggestion->SetString("originURL", failed_origin.Serialize()); 657 suggestion->SetString("originURL", failed_origin.Serialize());
658 suggestions_summary_list->Append(std::move(suggestion)); 658 suggestions_summary_list->Append(std::move(suggestion));
659 return; 659 return;
660 } 660 }
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 1083
1084 bool LocalizedError::HasStrings(const std::string& error_domain, 1084 bool LocalizedError::HasStrings(const std::string& error_domain,
1085 int error_code) { 1085 int error_code) {
1086 // Whether or not the there are strings for an error does not depend on 1086 // Whether or not the there are strings for an error does not depend on
1087 // whether or not the page was be generated by a POST, so just claim it was 1087 // whether or not the page was be generated by a POST, so just claim it was
1088 // not. 1088 // not.
1089 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr; 1089 return LookupErrorMap(error_domain, error_code, /*is_post=*/false) != nullptr;
1090 } 1090 }
1091 1091
1092 } // namespace error_page 1092 } // namespace error_page
OLDNEW
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | components/password_manager/core/browser/credential_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698