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

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

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
« no previous file with comments | « no previous file | components/open_from_clipboard/clipboard_recent_content.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_ 5 #ifndef COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_
6 #define COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_ 6 #define COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 // Returns how old the content of the clipboard is. 36 // Returns how old the content of the clipboard is.
37 virtual base::TimeDelta GetClipboardContentAge() const = 0; 37 virtual base::TimeDelta GetClipboardContentAge() const = 0;
38 38
39 // Prevent GetRecentURLFromClipboard from returning anything until the 39 // Prevent GetRecentURLFromClipboard from returning anything until the
40 // clipboard's content changed. 40 // clipboard's content changed.
41 virtual void SuppressClipboardContent() = 0; 41 virtual void SuppressClipboardContent() = 0;
42 42
43 protected: 43 protected:
44 // GetRecentURLFromClipboard() should never return a URL from a clipboard 44 // GetRecentURLFromClipboard() should never return a URL from a clipboard
45 // older than this. 45 // older than this.
46 const base::TimeDelta kMaximumAgeOfClipboard = base::TimeDelta::FromHours(3); 46 static base::TimeDelta MaximumAgeOfClipboard();
47 47
48 // Returns true if the URL is appropriate to be suggested. 48 // Returns true if the URL is appropriate to be suggested.
49 static bool IsAppropriateSuggestion(const GURL& url); 49 static bool IsAppropriateSuggestion(const GURL& url);
50 50
51 private: 51 private:
52 DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContent); 52 DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContent);
53 }; 53 };
54 54
55 #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_ 55 #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_
OLDNEW
« no previous file with comments | « no previous file | components/open_from_clipboard/clipboard_recent_content.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698