OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |