Chromium Code Reviews| Index: components/omnibox/browser/autocomplete_controller.cc |
| diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc |
| index ccbdfd3d0d1059d4ff3af027e8001ba2f80abb75..3d5e62754a53a675b666c32df9550e01de62456c 100644 |
| --- a/components/omnibox/browser/autocomplete_controller.cc |
| +++ b/components/omnibox/browser/autocomplete_controller.cc |
| @@ -32,14 +32,15 @@ |
| #include "components/omnibox/browser/shortcuts_provider.h" |
| #include "components/omnibox/browser/zero_suggest_provider.h" |
| #include "components/open_from_clipboard/clipboard_recent_content.h" |
| -#if !defined(OS_IOS) |
| -#include "components/open_from_clipboard/clipboard_recent_content_generic.h" |
| -#endif |
| #include "components/search_engines/template_url.h" |
| #include "components/search_engines/template_url_service.h" |
| #include "components/strings/grit/components_strings.h" |
| #include "ui/base/l10n/l10n_util.h" |
| +#if !defined(OS_IOS) |
| +#include "components/open_from_clipboard/clipboard_recent_content_generic.h" |
| +#endif |
| + |
| namespace { |
| // Converts the given match to a type (and possibly subtype) based on the AQS |
| @@ -241,9 +242,9 @@ AutocompleteController::AutocompleteController( |
| // iOS doesn't want/need to link in the implementation and the libraries |
| // that would come with it. |
| if (!ClipboardRecentContent::GetInstance()) { |
| - clipboard_recent_content_ = |
| - base::MakeUnique<ClipboardRecentContentGeneric>(); |
| - ClipboardRecentContent::SetInstance(clipboard_recent_content_.get()); |
| + // This point is intentionally leaked, since no action is necessary at |
|
Peter Kasting
2017/04/06 19:35:41
Nit: pointer
Mark P
2017/04/06 23:25:27
Done.
|
| + // shutdown. |
| + ClipboardRecentContent::SetInstance(new ClipboardRecentContentGeneric()); |
| } |
| #endif |
| // ClipboardRecentContent can be null in iOS tests. For non-iOS, we |