Commit e07980a1 authored by Robbie Gibson's avatar Robbie Gibson Committed by Commit Bot

Rename ClipboardURLProvider to ClipboardProvider

ClipboardURLProvider now provides matches for text and images on the
clipboard as well as URLs. Therefore, we should rename it to just
ClipboardProvider.

Bug: 923443
Change-Id: I43ab8036cf2b0c564ebc3588b4c2324628ab2ee7
Reviewed-on: https://chromium-review.googlesource.com/c/1445401Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Cr-Commit-Position: refs/heads/master@{#632681}
parent e0f9de60
...@@ -97,8 +97,8 @@ jumbo_static_library("browser") { ...@@ -97,8 +97,8 @@ jumbo_static_library("browser") {
"bookmark_provider.h", "bookmark_provider.h",
"builtin_provider.cc", "builtin_provider.cc",
"builtin_provider.h", "builtin_provider.h",
"clipboard_url_provider.cc", "clipboard_provider.cc",
"clipboard_url_provider.h", "clipboard_provider.h",
"contextual_suggestions_service.cc", "contextual_suggestions_service.cc",
"contextual_suggestions_service.h", "contextual_suggestions_service.h",
"document_provider.cc", "document_provider.cc",
...@@ -373,7 +373,7 @@ source_set("unit_tests") { ...@@ -373,7 +373,7 @@ source_set("unit_tests") {
"base_search_provider_unittest.cc", "base_search_provider_unittest.cc",
"bookmark_provider_unittest.cc", "bookmark_provider_unittest.cc",
"builtin_provider_unittest.cc", "builtin_provider_unittest.cc",
"clipboard_url_provider_unittest.cc", "clipboard_provider_unittest.cc",
"contextual_suggestions_service_unittest.cc", "contextual_suggestions_service_unittest.cc",
"document_provider_unittest.cc", "document_provider_unittest.cc",
"favicon_cache_unittest.cc", "favicon_cache_unittest.cc",
......
per-file clipboard_url_provider.*=jif@chromium.org per-file clipboard_provider.*=jif@chromium.org
# COMPONENT: UI>Browser>Omnibox # COMPONENT: UI>Browser>Omnibox
...@@ -43,7 +43,7 @@ int AutocompleteClassifier::DefaultOmniboxProviders() { ...@@ -43,7 +43,7 @@ int AutocompleteClassifier::DefaultOmniboxProviders() {
#endif #endif
AutocompleteProvider::TYPE_ZERO_SUGGEST | AutocompleteProvider::TYPE_ZERO_SUGGEST |
(base::FeatureList::IsEnabled(omnibox::kEnableClipboardProvider) (base::FeatureList::IsEnabled(omnibox::kEnableClipboardProvider)
? AutocompleteProvider::TYPE_CLIPBOARD_URL ? AutocompleteProvider::TYPE_CLIPBOARD
: 0) | : 0) |
(base::FeatureList::IsEnabled(omnibox::kDocumentProvider) (base::FeatureList::IsEnabled(omnibox::kDocumentProvider)
? AutocompleteProvider::TYPE_DOCUMENT ? AutocompleteProvider::TYPE_DOCUMENT
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "components/omnibox/browser/autocomplete_controller_delegate.h" #include "components/omnibox/browser/autocomplete_controller_delegate.h"
#include "components/omnibox/browser/bookmark_provider.h" #include "components/omnibox/browser/bookmark_provider.h"
#include "components/omnibox/browser/builtin_provider.h" #include "components/omnibox/browser/builtin_provider.h"
#include "components/omnibox/browser/clipboard_url_provider.h" #include "components/omnibox/browser/clipboard_provider.h"
#include "components/omnibox/browser/document_provider.h" #include "components/omnibox/browser/document_provider.h"
#include "components/omnibox/browser/history_quick_provider.h" #include "components/omnibox/browser/history_quick_provider.h"
#include "components/omnibox/browser/history_url_provider.h" #include "components/omnibox/browser/history_url_provider.h"
...@@ -247,7 +247,7 @@ AutocompleteController::AutocompleteController( ...@@ -247,7 +247,7 @@ AutocompleteController::AutocompleteController(
document_provider_ = DocumentProvider::Create(provider_client_.get(), this); document_provider_ = DocumentProvider::Create(provider_client_.get(), this);
providers_.push_back(document_provider_); providers_.push_back(document_provider_);
} }
if (provider_types & AutocompleteProvider::TYPE_CLIPBOARD_URL) { if (provider_types & AutocompleteProvider::TYPE_CLIPBOARD) {
#if !defined(OS_IOS) #if !defined(OS_IOS)
// On iOS, a global ClipboardRecentContent should've been created by now // On iOS, a global ClipboardRecentContent should've been created by now
// (if enabled). If none has been created (e.g., we're on a different // (if enabled). If none has been created (e.g., we're on a different
...@@ -263,7 +263,7 @@ AutocompleteController::AutocompleteController( ...@@ -263,7 +263,7 @@ AutocompleteController::AutocompleteController(
// ClipboardRecentContent can be null in iOS tests. For non-iOS, we // ClipboardRecentContent can be null in iOS tests. For non-iOS, we
// create a ClipboardRecentContent as above (for both Chrome and tests). // create a ClipboardRecentContent as above (for both Chrome and tests).
if (ClipboardRecentContent::GetInstance()) { if (ClipboardRecentContent::GetInstance()) {
providers_.push_back(new ClipboardURLProvider( providers_.push_back(new ClipboardProvider(
provider_client_.get(), this, history_url_provider_, provider_client_.get(), this, history_url_provider_,
ClipboardRecentContent::GetInstance())); ClipboardRecentContent::GetInstance()));
} }
......
...@@ -49,8 +49,8 @@ const char* AutocompleteProvider::TypeToString(Type type) { ...@@ -49,8 +49,8 @@ const char* AutocompleteProvider::TypeToString(Type type) {
return "Shortcuts"; return "Shortcuts";
case TYPE_ZERO_SUGGEST: case TYPE_ZERO_SUGGEST:
return "ZeroSuggest"; return "ZeroSuggest";
case TYPE_CLIPBOARD_URL: case TYPE_CLIPBOARD:
return "ClipboardURL"; return "Clipboard";
default: default:
NOTREACHED() << "Unhandled AutocompleteProvider::Type " << type; NOTREACHED() << "Unhandled AutocompleteProvider::Type " << type;
return "Unknown"; return "Unknown";
...@@ -233,8 +233,8 @@ metrics::OmniboxEventProto_ProviderType AutocompleteProvider:: ...@@ -233,8 +233,8 @@ metrics::OmniboxEventProto_ProviderType AutocompleteProvider::
return metrics::OmniboxEventProto::SHORTCUTS; return metrics::OmniboxEventProto::SHORTCUTS;
case TYPE_ZERO_SUGGEST: case TYPE_ZERO_SUGGEST:
return metrics::OmniboxEventProto::ZERO_SUGGEST; return metrics::OmniboxEventProto::ZERO_SUGGEST;
case TYPE_CLIPBOARD_URL: case TYPE_CLIPBOARD:
return metrics::OmniboxEventProto::CLIPBOARD_URL; return metrics::OmniboxEventProto::CLIPBOARD;
default: default:
NOTREACHED() << "Unhandled AutocompleteProvider::Type " << type_; NOTREACHED() << "Unhandled AutocompleteProvider::Type " << type_;
return metrics::OmniboxEventProto::UNKNOWN_PROVIDER; return metrics::OmniboxEventProto::UNKNOWN_PROVIDER;
......
...@@ -140,7 +140,7 @@ class AutocompleteProvider ...@@ -140,7 +140,7 @@ class AutocompleteProvider
TYPE_SEARCH = 1 << 5, TYPE_SEARCH = 1 << 5,
TYPE_SHORTCUTS = 1 << 6, TYPE_SHORTCUTS = 1 << 6,
TYPE_ZERO_SUGGEST = 1 << 7, TYPE_ZERO_SUGGEST = 1 << 7,
TYPE_CLIPBOARD_URL = 1 << 8, TYPE_CLIPBOARD = 1 << 8,
TYPE_DOCUMENT = 1 << 9, TYPE_DOCUMENT = 1 << 9,
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "components/omnibox/browser/clipboard_url_provider.h" #include "components/omnibox/browser/clipboard_provider.h"
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
...@@ -32,12 +32,11 @@ ...@@ -32,12 +32,11 @@
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image_util.h" #include "ui/gfx/image/image_util.h"
ClipboardURLProvider::ClipboardURLProvider( ClipboardProvider::ClipboardProvider(AutocompleteProviderClient* client,
AutocompleteProviderClient* client, AutocompleteProviderListener* listener,
AutocompleteProviderListener* listener, HistoryURLProvider* history_url_provider,
HistoryURLProvider* history_url_provider, ClipboardRecentContent* clipboard_content)
ClipboardRecentContent* clipboard_content) : AutocompleteProvider(AutocompleteProvider::TYPE_CLIPBOARD),
: AutocompleteProvider(AutocompleteProvider::TYPE_CLIPBOARD_URL),
client_(client), client_(client),
listener_(listener), listener_(listener),
clipboard_content_(clipboard_content), clipboard_content_(clipboard_content),
...@@ -47,10 +46,10 @@ ClipboardURLProvider::ClipboardURLProvider( ...@@ -47,10 +46,10 @@ ClipboardURLProvider::ClipboardURLProvider(
DCHECK(clipboard_content_); DCHECK(clipboard_content_);
} }
ClipboardURLProvider::~ClipboardURLProvider() {} ClipboardProvider::~ClipboardProvider() {}
void ClipboardURLProvider::Start(const AutocompleteInput& input, void ClipboardProvider::Start(const AutocompleteInput& input,
bool minimal_changes) { bool minimal_changes) {
matches_.clear(); matches_.clear();
// If the user started typing, do not offer clipboard based match. // If the user started typing, do not offer clipboard based match.
...@@ -74,13 +73,13 @@ void ClipboardURLProvider::Start(const AutocompleteInput& input, ...@@ -74,13 +73,13 @@ void ClipboardURLProvider::Start(const AutocompleteInput& input,
AddCreatedMatchWithTracking(input, std::move(optional_match).value()); AddCreatedMatchWithTracking(input, std::move(optional_match).value());
} }
void ClipboardURLProvider::Stop(bool clear_cached_results, void ClipboardProvider::Stop(bool clear_cached_results,
bool due_to_user_inactivity) { bool due_to_user_inactivity) {
callback_weak_ptr_factory_.InvalidateWeakPtrs(); callback_weak_ptr_factory_.InvalidateWeakPtrs();
AutocompleteProvider::Stop(clear_cached_results, due_to_user_inactivity); AutocompleteProvider::Stop(clear_cached_results, due_to_user_inactivity);
} }
void ClipboardURLProvider::AddCreatedMatchWithTracking( void ClipboardProvider::AddCreatedMatchWithTracking(
const AutocompleteInput& input, const AutocompleteInput& input,
const AutocompleteMatch& match) { const AutocompleteMatch& match) {
// Record the number of times the currently-offered URL has been suggested. // Record the number of times the currently-offered URL has been suggested.
...@@ -117,7 +116,7 @@ void ClipboardURLProvider::AddCreatedMatchWithTracking( ...@@ -117,7 +116,7 @@ void ClipboardURLProvider::AddCreatedMatchWithTracking(
matches_.emplace_back(match); matches_.emplace_back(match);
} }
base::Optional<AutocompleteMatch> ClipboardURLProvider::CreateURLMatch( base::Optional<AutocompleteMatch> ClipboardProvider::CreateURLMatch(
const AutocompleteInput& input) { const AutocompleteInput& input) {
// The clipboard does not contain a URL worth suggesting. // The clipboard does not contain a URL worth suggesting.
base::Optional<GURL> optional_gurl = base::Optional<GURL> optional_gurl =
...@@ -155,7 +154,7 @@ base::Optional<AutocompleteMatch> ClipboardURLProvider::CreateURLMatch( ...@@ -155,7 +154,7 @@ base::Optional<AutocompleteMatch> ClipboardURLProvider::CreateURLMatch(
return match; return match;
} }
base::Optional<AutocompleteMatch> ClipboardURLProvider::CreateTextMatch( base::Optional<AutocompleteMatch> ClipboardProvider::CreateTextMatch(
const AutocompleteInput& input) { const AutocompleteInput& input) {
// Only try text match if feature is enabled // Only try text match if feature is enabled
if (!base::FeatureList::IsEnabled( if (!base::FeatureList::IsEnabled(
...@@ -206,7 +205,7 @@ base::Optional<AutocompleteMatch> ClipboardURLProvider::CreateTextMatch( ...@@ -206,7 +205,7 @@ base::Optional<AutocompleteMatch> ClipboardURLProvider::CreateTextMatch(
return match; return match;
} }
bool ClipboardURLProvider::CreateImageMatch(const AutocompleteInput& input) { bool ClipboardProvider::CreateImageMatch(const AutocompleteInput& input) {
// Only try image match if feature is enabled // Only try image match if feature is enabled
if (!base::FeatureList::IsEnabled( if (!base::FeatureList::IsEnabled(
omnibox::kEnableClipboardProviderImageSuggestions)) { omnibox::kEnableClipboardProviderImageSuggestions)) {
...@@ -231,21 +230,21 @@ bool ClipboardURLProvider::CreateImageMatch(const AutocompleteInput& input) { ...@@ -231,21 +230,21 @@ bool ClipboardURLProvider::CreateImageMatch(const AutocompleteInput& input) {
done_ = false; done_ = false;
PostTaskAndReplyWithResult( PostTaskAndReplyWithResult(
FROM_HERE, FROM_HERE,
base::BindOnce(&ClipboardURLProvider::EncodeClipboardImage, base::BindOnce(&ClipboardProvider::EncodeClipboardImage,
optional_image.value()), optional_image.value()),
base::BindOnce(&ClipboardURLProvider::ConstructImageMatchCallback, base::BindOnce(&ClipboardProvider::ConstructImageMatchCallback,
callback_weak_ptr_factory_.GetWeakPtr(), input, callback_weak_ptr_factory_.GetWeakPtr(), input,
url_service)); url_service));
return true; return true;
} }
scoped_refptr<base::RefCountedMemory> scoped_refptr<base::RefCountedMemory> ClipboardProvider::EncodeClipboardImage(
ClipboardURLProvider::EncodeClipboardImage(gfx::Image image) { gfx::Image image) {
gfx::Image resized_image = gfx::ResizedImageForSearchByImage(image); gfx::Image resized_image = gfx::ResizedImageForSearchByImage(image);
return resized_image.As1xPNGBytes(); return resized_image.As1xPNGBytes();
} }
void ClipboardURLProvider::ConstructImageMatchCallback( void ClipboardProvider::ConstructImageMatchCallback(
const AutocompleteInput& input, const AutocompleteInput& input,
TemplateURLService* url_service, TemplateURLService* url_service,
scoped_refptr<base::RefCountedMemory> image_bytes) { scoped_refptr<base::RefCountedMemory> image_bytes) {
...@@ -282,7 +281,7 @@ void ClipboardURLProvider::ConstructImageMatchCallback( ...@@ -282,7 +281,7 @@ void ClipboardURLProvider::ConstructImageMatchCallback(
done_ = true; done_ = true;
} }
void ClipboardURLProvider::AddProviderInfo(ProvidersInfo* provider_info) const { void ClipboardProvider::AddProviderInfo(ProvidersInfo* provider_info) const {
// If a URL wasn't suggested on this most recent focus event, don't bother // If a URL wasn't suggested on this most recent focus event, don't bother
// setting |times_returned_results_in_session|, as in effect this URL has // setting |times_returned_results_in_session|, as in effect this URL has
// never been suggested during the current session. (For the purpose of // never been suggested during the current session. (For the purpose of
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_ #ifndef COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_PROVIDER_H_
#define COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_ #define COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_PROVIDER_H_
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/macros.h" #include "base/macros.h"
...@@ -15,12 +15,12 @@ class ClipboardRecentContent; ...@@ -15,12 +15,12 @@ class ClipboardRecentContent;
class HistoryURLProvider; class HistoryURLProvider;
// Autocomplete provider offering content based on the clipboard's content. // Autocomplete provider offering content based on the clipboard's content.
class ClipboardURLProvider : public AutocompleteProvider { class ClipboardProvider : public AutocompleteProvider {
public: public:
ClipboardURLProvider(AutocompleteProviderClient* client, ClipboardProvider(AutocompleteProviderClient* client,
AutocompleteProviderListener* listener, AutocompleteProviderListener* listener,
HistoryURLProvider* history_url_provider, HistoryURLProvider* history_url_provider,
ClipboardRecentContent* clipboard_content); ClipboardRecentContent* clipboard_content);
// AutocompleteProvider implementation. // AutocompleteProvider implementation.
void Start(const AutocompleteInput& input, bool minimal_changes) override; void Start(const AutocompleteInput& input, bool minimal_changes) override;
...@@ -28,9 +28,9 @@ class ClipboardURLProvider : public AutocompleteProvider { ...@@ -28,9 +28,9 @@ class ClipboardURLProvider : public AutocompleteProvider {
void AddProviderInfo(ProvidersInfo* provider_info) const override; void AddProviderInfo(ProvidersInfo* provider_info) const override;
private: private:
FRIEND_TEST_ALL_PREFIXES(ClipboardURLProviderTest, MatchesImage); FRIEND_TEST_ALL_PREFIXES(ClipboardProviderTest, MatchesImage);
~ClipboardURLProvider() override; ~ClipboardProvider() override;
// Handle the match created from one of the match creation methods and do // Handle the match created from one of the match creation methods and do
// extra tracking and match adding. // extra tracking and match adding.
...@@ -75,9 +75,9 @@ class ClipboardURLProvider : public AutocompleteProvider { ...@@ -75,9 +75,9 @@ class ClipboardURLProvider : public AutocompleteProvider {
// Used to cancel image construction callbacks if autocomplete Stop() is // Used to cancel image construction callbacks if autocomplete Stop() is
// called. // called.
base::WeakPtrFactory<ClipboardURLProvider> callback_weak_ptr_factory_; base::WeakPtrFactory<ClipboardProvider> callback_weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ClipboardURLProvider); DISALLOW_COPY_AND_ASSIGN(ClipboardProvider);
}; };
#endif // COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_URL_PROVIDER_H_ #endif // COMPONENTS_OMNIBOX_BROWSER_CLIPBOARD_PROVIDER_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "components/omnibox/browser/clipboard_url_provider.h" #include "components/omnibox/browser/clipboard_provider.h"
#include <memory> #include <memory>
#include <string> #include <string>
...@@ -34,19 +34,19 @@ const char kClipboardTitleText[] = "\"Search for me\""; ...@@ -34,19 +34,19 @@ const char kClipboardTitleText[] = "\"Search for me\"";
} // namespace } // namespace
class ClipboardURLProviderTest : public testing::Test, class ClipboardProviderTest : public testing::Test,
public AutocompleteProviderListener { public AutocompleteProviderListener {
public: public:
ClipboardURLProviderTest() ClipboardProviderTest()
: client_(new MockAutocompleteProviderClient()), : client_(new MockAutocompleteProviderClient()),
provider_(new ClipboardURLProvider(client_.get(), provider_(new ClipboardProvider(client_.get(),
this, this,
nullptr, nullptr,
&clipboard_content_)) { &clipboard_content_)) {
SetClipboardUrl(GURL(kClipboardURL)); SetClipboardUrl(GURL(kClipboardURL));
} }
~ClipboardURLProviderTest() override {} ~ClipboardProviderTest() override {}
void ClearClipboard() { clipboard_content_.SuppressClipboardContent(); } void ClearClipboard() { clipboard_content_.SuppressClipboardContent(); }
...@@ -78,37 +78,37 @@ class ClipboardURLProviderTest : public testing::Test, ...@@ -78,37 +78,37 @@ class ClipboardURLProviderTest : public testing::Test,
TestSchemeClassifier classifier_; TestSchemeClassifier classifier_;
FakeClipboardRecentContent clipboard_content_; FakeClipboardRecentContent clipboard_content_;
std::unique_ptr<MockAutocompleteProviderClient> client_; std::unique_ptr<MockAutocompleteProviderClient> client_;
scoped_refptr<ClipboardURLProvider> provider_; scoped_refptr<ClipboardProvider> provider_;
}; };
void ClipboardURLProviderTest::OnProviderUpdate(bool updated_matches) { void ClipboardProviderTest::OnProviderUpdate(bool updated_matches) {
// No action required. // No action required.
} }
TEST_F(ClipboardURLProviderTest, NotFromOmniboxFocus) { TEST_F(ClipboardProviderTest, NotFromOmniboxFocus) {
provider_->Start(CreateAutocompleteInput(false), false); provider_->Start(CreateAutocompleteInput(false), false);
EXPECT_TRUE(provider_->matches().empty()); EXPECT_TRUE(provider_->matches().empty());
} }
TEST_F(ClipboardURLProviderTest, EmptyClipboard) { TEST_F(ClipboardProviderTest, EmptyClipboard) {
ClearClipboard(); ClearClipboard();
provider_->Start(CreateAutocompleteInput(true), false); provider_->Start(CreateAutocompleteInput(true), false);
EXPECT_TRUE(provider_->matches().empty()); EXPECT_TRUE(provider_->matches().empty());
} }
TEST_F(ClipboardURLProviderTest, ClipboardIsCurrentURL) { TEST_F(ClipboardProviderTest, ClipboardIsCurrentURL) {
SetClipboardUrl(GURL(kCurrentURL)); SetClipboardUrl(GURL(kCurrentURL));
provider_->Start(CreateAutocompleteInput(true), false); provider_->Start(CreateAutocompleteInput(true), false);
EXPECT_TRUE(provider_->matches().empty()); EXPECT_TRUE(provider_->matches().empty());
} }
TEST_F(ClipboardURLProviderTest, HasMultipleMatches) { TEST_F(ClipboardProviderTest, HasMultipleMatches) {
provider_->Start(CreateAutocompleteInput(true), false); provider_->Start(CreateAutocompleteInput(true), false);
ASSERT_GE(provider_->matches().size(), 1U); ASSERT_GE(provider_->matches().size(), 1U);
EXPECT_EQ(GURL(kClipboardURL), provider_->matches().back().destination_url); EXPECT_EQ(GURL(kClipboardURL), provider_->matches().back().destination_url);
} }
TEST_F(ClipboardURLProviderTest, MatchesText) { TEST_F(ClipboardProviderTest, MatchesText) {
base::test::ScopedFeatureList feature_list; base::test::ScopedFeatureList feature_list;
base::Feature textFeature = omnibox::kEnableClipboardProviderTextSuggestions; base::Feature textFeature = omnibox::kEnableClipboardProviderTextSuggestions;
feature_list.InitAndEnableFeature(textFeature); feature_list.InitAndEnableFeature(textFeature);
...@@ -122,7 +122,7 @@ TEST_F(ClipboardURLProviderTest, MatchesText) { ...@@ -122,7 +122,7 @@ TEST_F(ClipboardURLProviderTest, MatchesText) {
provider_->matches().back().contents); provider_->matches().back().contents);
} }
TEST_F(ClipboardURLProviderTest, MatchesImage) { TEST_F(ClipboardProviderTest, MatchesImage) {
base::test::ScopedFeatureList feature_list; base::test::ScopedFeatureList feature_list;
base::Feature imageFeature = base::Feature imageFeature =
omnibox::kEnableClipboardProviderImageSuggestions; omnibox::kEnableClipboardProviderImageSuggestions;
......
Name: Metrics Protos Name: Metrics Protos
Short Name: metrics_proto Short Name: metrics_proto
URL: This is the canonical public repository URL: This is the canonical public repository
Version: 232558611 Version: 233608850
Date: 2019/02/05 UTC Date: 2019/02/12 UTC
License: BSD License: BSD
Security Critical: Yes Security Critical: Yes
......
...@@ -193,10 +193,10 @@ message OmniboxEventProto { ...@@ -193,10 +193,10 @@ message OmniboxEventProto {
// This enum value is currently only used by Android GSA. It represents // This enum value is currently only used by Android GSA. It represents
// a suggestion powered by a Chrome content provider. // a suggestion powered by a Chrome content provider.
ON_DEVICE_CHROME = 13; ON_DEVICE_CHROME = 13;
CLIPBOARD_URL = 14; // Suggestion coming from clipboard. CLIPBOARD = 14; // Suggestion coming from clipboard.
PHYSICAL_WEB = 15; // DEPRECATED. Suggestions triggered by URLs broadcast PHYSICAL_WEB = 15; // DEPRECATED. Suggestions triggered by URLs broadcast
// by nearby devices. // by nearby devices.
DOCUMENT = 16; // Suggestions for documents in a cloud corpus. DOCUMENT = 16; // Suggestions for documents in a cloud corpus.
} }
// The result set displayed on the completion popup // The result set displayed on the completion popup
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment