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

Side by Side Diff: components/omnibox/browser/clipboard_url_provider.h

Issue 2904293002: Omnibox - Clipboard Provider - Record Number of Times Suggestion Offered (Closed)
Patch Set: isherman's comments Created 3 years, 6 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/omnibox/browser/clipboard_url_provider.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_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_ 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_
6 #define COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_ 6 #define COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/omnibox/browser/autocomplete_provider.h" 9 #include "components/omnibox/browser/autocomplete_provider.h"
10 #include "components/omnibox/browser/history_url_provider.h" 10 #include "components/omnibox/browser/history_url_provider.h"
11 11
12 class AutocompleteProviderClient; 12 class AutocompleteProviderClient;
13 class ClipboardRecentContent; 13 class ClipboardRecentContent;
14 class HistoryURLProvider; 14 class HistoryURLProvider;
15 15
16 // Autocomplete provider offering content based on the clipboard's content. 16 // Autocomplete provider offering content based on the clipboard's content.
17 class ClipboardURLProvider : public AutocompleteProvider { 17 class ClipboardURLProvider : public AutocompleteProvider {
18 public: 18 public:
19 ClipboardURLProvider(AutocompleteProviderClient* client, 19 ClipboardURLProvider(AutocompleteProviderClient* client,
20 HistoryURLProvider* history_url_provider, 20 HistoryURLProvider* history_url_provider,
21 ClipboardRecentContent* clipboard_content); 21 ClipboardRecentContent* clipboard_content);
22 22
23 // AutocompleteProvider implementation. 23 // AutocompleteProvider implementation.
24 void Start(const AutocompleteInput& input, bool minimal_changes) override; 24 void Start(const AutocompleteInput& input, bool minimal_changes) override;
25 void AddProviderInfo(ProvidersInfo* provider_info) const override;
25 26
26 private: 27 private:
27 ~ClipboardURLProvider() override; 28 ~ClipboardURLProvider() override;
28 29
29 AutocompleteProviderClient* client_; 30 AutocompleteProviderClient* client_;
30 ClipboardRecentContent* clipboard_content_; 31 ClipboardRecentContent* clipboard_content_;
31 32
32 // Used for efficiency when creating the verbatim match. Can be NULL. 33 // Used for efficiency when creating the verbatim match. Can be NULL.
33 HistoryURLProvider* history_url_provider_; 34 HistoryURLProvider* history_url_provider_;
34 35
36 // The current URL suggested and the number of times it has been offered.
37 // Used for recording metrics.
38 GURL current_url_suggested_;
39 size_t current_url_suggested_times_;
40
35 DISALLOW_COPY_AND_ASSIGN(ClipboardURLProvider); 41 DISALLOW_COPY_AND_ASSIGN(ClipboardURLProvider);
36 }; 42 };
37 43
38 #endif // COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_ 44 #endif // COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | components/omnibox/browser/clipboard_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698