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

Side by Side Diff: chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" 5 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" 9 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // static 25 // static
26 void AlternateNavInfoBarDelegate::Create( 26 void AlternateNavInfoBarDelegate::Create(
27 content::WebContents* web_contents, 27 content::WebContents* web_contents,
28 const base::string16& text, 28 const base::string16& text,
29 const AutocompleteMatch& match, 29 const AutocompleteMatch& match,
30 const GURL& search_url) { 30 const GURL& search_url) {
31 InfoBarService* infobar_service = 31 InfoBarService* infobar_service =
32 InfoBarService::FromWebContents(web_contents); 32 InfoBarService::FromWebContents(web_contents);
33 infobar_service->AddInfoBar(AlternateNavInfoBarDelegate::CreateInfoBar( 33 infobar_service->AddInfoBar(AlternateNavInfoBarDelegate::CreateInfoBar(
34 scoped_ptr<AlternateNavInfoBarDelegate>(new AlternateNavInfoBarDelegate( 34 std::unique_ptr<AlternateNavInfoBarDelegate>(
35 Profile::FromBrowserContext(web_contents->GetBrowserContext()), text, 35 new AlternateNavInfoBarDelegate(
36 match, search_url)))); 36 Profile::FromBrowserContext(web_contents->GetBrowserContext()),
37 text, match, search_url))));
37 } 38 }
38 39
39 AlternateNavInfoBarDelegate::AlternateNavInfoBarDelegate( 40 AlternateNavInfoBarDelegate::AlternateNavInfoBarDelegate(
40 Profile* profile, 41 Profile* profile,
41 const base::string16& text, 42 const base::string16& text,
42 const AutocompleteMatch& match, 43 const AutocompleteMatch& match,
43 const GURL& search_url) 44 const GURL& search_url)
44 : infobars::InfoBarDelegate(), 45 : infobars::InfoBarDelegate(),
45 profile_(profile), 46 profile_(profile),
46 text_(text), 47 text_(text),
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return IDR_INFOBAR_ALT_NAV_URL; 113 return IDR_INFOBAR_ALT_NAV_URL;
113 } 114 }
114 115
115 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const { 116 gfx::VectorIconId AlternateNavInfoBarDelegate::GetVectorIconId() const {
116 #if defined(OS_MACOSX) 117 #if defined(OS_MACOSX)
117 return gfx::VectorIconId::VECTOR_ICON_NONE; 118 return gfx::VectorIconId::VECTOR_ICON_NONE;
118 #else 119 #else
119 return gfx::VectorIconId::GLOBE; 120 return gfx::VectorIconId::GLOBE;
120 #endif 121 #endif
121 } 122 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h ('k') | chrome/browser/ui/omnibox/chrome_omnibox_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698