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

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

Issue 2808413003: Omnibox - Reduce Clipboard URL Suggestions to 1 Hour (Closed)
Patch Set: cleanup field trial.h 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 #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 <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 24 matching lines...) Expand all
35 // Returns how old the content of the clipboard is. 35 // Returns how old the content of the clipboard is.
36 virtual base::TimeDelta GetClipboardContentAge() const = 0; 36 virtual base::TimeDelta GetClipboardContentAge() const = 0;
37 37
38 // Prevent GetRecentURLFromClipboard from returning anything until the 38 // Prevent GetRecentURLFromClipboard from returning anything until the
39 // clipboard's content changed. 39 // clipboard's content changed.
40 virtual void SuppressClipboardContent() = 0; 40 virtual void SuppressClipboardContent() = 0;
41 41
42 protected: 42 protected:
43 // GetRecentURLFromClipboard() should never return a URL from a clipboard 43 // GetRecentURLFromClipboard() should never return a URL from a clipboard
44 // older than this. 44 // older than this.
45 const base::TimeDelta kMaximumAgeOfClipboard = base::TimeDelta::FromHours(3); 45 static base::TimeDelta MaximumAgeOfClipboard();
46 46
47 // Returns true if the URL is appropriate to be suggested. 47 // Returns true if the URL is appropriate to be suggested.
48 static bool IsAppropriateSuggestion(const GURL& url); 48 static bool IsAppropriateSuggestion(const GURL& url);
49 49
50 private: 50 private:
51 DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContent); 51 DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContent);
52 }; 52 };
53 53
54 #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_ 54 #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698