Enable CopiedContentBehavior and omnibox text and image provider flags
Overall, the impact ranges from minimal to positive across the three
flags.
Bug: 933385
Change-Id: Ie6015388b7a1fbd2e71c7a9a6a0b03efde8c957b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1660859
Reviewed-by: Justin Donnelly <[email protected]>
Reviewed-by: Cait Phillips <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Commit-Queue: Robbie Gibson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#679422}
diff --git a/components/omnibox/browser/clipboard_provider.cc b/components/omnibox/browser/clipboard_provider.cc
index 97fadbf..fe54f6a 100644
--- a/components/omnibox/browser/clipboard_provider.cc
+++ b/components/omnibox/browser/clipboard_provider.cc
@@ -231,6 +231,12 @@
return false;
}
+ base::Optional<gfx::Image> optional_image =
+ clipboard_content_->GetRecentImageFromClipboard();
+ if (!optional_image) {
+ return false;
+ }
+
// Make sure current provider supports image search
TemplateURLService* url_service = client_->GetTemplateURLService();
const TemplateURL* default_url = url_service->GetDefaultSearchProvider();
@@ -240,12 +246,6 @@
return false;
}
- base::Optional<gfx::Image> optional_image =
- clipboard_content_->GetRecentImageFromClipboard();
- if (!optional_image) {
- return false;
- }
-
// We want to get the age here because the contents of the clipboard could
// change after this point. We want the age of the image we actually use, not
// the age of whatever's on the clipboard when the histogram is created (i.e