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

Unified Diff: components/open_from_clipboard/clipboard_recent_content.cc

Issue 2842793003: Clipboard Recent Content - Code Health - Move kAuthorizedScheme into Subclass (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: components/open_from_clipboard/clipboard_recent_content.cc
diff --git a/components/open_from_clipboard/clipboard_recent_content.cc b/components/open_from_clipboard/clipboard_recent_content.cc
index a06be7bf4542daa9aebf4687c7ab0d61dda495f4..fc040be2dae199c8bb88dc7ef620fea173acbe53 100644
--- a/components/open_from_clipboard/clipboard_recent_content.cc
+++ b/components/open_from_clipboard/clipboard_recent_content.cc
@@ -12,16 +12,6 @@
namespace {
ClipboardRecentContent* g_clipboard_recent_content = nullptr;
-// Schemes appropriate for suggestion by ClipboardRecentContent.
-const char* kAuthorizedSchemes[] = {
- url::kAboutScheme, url::kDataScheme, url::kHttpScheme, url::kHttpsScheme,
- // TODO(mpearson): add support for chrome:// URLs. Right now the scheme
- // for that lives in content and is accessible via
- // GetEmbedderRepresentationOfAboutScheme() or content::kChromeUIScheme
- // TODO(mpearson): when adding desktop support, add kFileScheme, kFtpScheme,
- // and kGopherScheme.
-};
-
} // namespace
ClipboardRecentContent::ClipboardRecentContent() {}
@@ -42,18 +32,6 @@ void ClipboardRecentContent::SetInstance(
}
// static
-bool ClipboardRecentContent::IsAppropriateSuggestion(const GURL& url) {
- // Check to make sure it's a scheme we're willing to suggest.
- for (const auto* authorized_scheme : kAuthorizedSchemes) {
- if (url.SchemeIs(authorized_scheme))
- return true;
- }
-
- // Not a scheme we're allowed to return.
- return false;
-}
-
-// static
base::TimeDelta ClipboardRecentContent::MaximumAgeOfClipboard() {
// Identify the current setting for this parameter from the omnibox field
// trial.

Powered by Google App Engine
This is Rietveld 408576698