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

Side by Side Diff: components/open_from_clipboard/clipboard_recent_content.cc

Issue 2817003003: Get maximum age of clipboard from clipboard_recent_contents.cc in iOS impl (Closed)
Patch Set: fix generic + rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/open_from_clipboard/clipboard_recent_content.h" 5 #include "components/open_from_clipboard/clipboard_recent_content.h"
6 6
7 #include "url/url_constants.h" 7 #include "url/url_constants.h"
8 8
9 namespace { 9 namespace {
10 ClipboardRecentContent* g_clipboard_recent_content = nullptr; 10 ClipboardRecentContent* g_clipboard_recent_content = nullptr;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool ClipboardRecentContent::IsAppropriateSuggestion(const GURL& url) { 42 bool ClipboardRecentContent::IsAppropriateSuggestion(const GURL& url) {
43 // Check to make sure it's a scheme we're willing to suggest. 43 // Check to make sure it's a scheme we're willing to suggest.
44 for (const auto* authorized_scheme : kAuthorizedSchemes) { 44 for (const auto* authorized_scheme : kAuthorizedSchemes) {
45 if (url.SchemeIs(authorized_scheme)) 45 if (url.SchemeIs(authorized_scheme))
46 return true; 46 return true;
47 } 47 }
48 48
49 // Not a scheme we're allowed to return. 49 // Not a scheme we're allowed to return.
50 return false; 50 return false;
51 } 51 }
52
53 // static
54 base::TimeDelta ClipboardRecentContent::MaximumAgeOfClipboard() {
55 return base::TimeDelta::FromHours(3);
56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698