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

Side by Side Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.cc

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 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 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 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h" 5 #include "chrome/browser/android/banners/app_banner_infobar_delegate_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 std::string webapk_package_name = ""; 59 std::string webapk_package_name = "";
60 const GURL& url = shortcut_info->url; 60 const GURL& url = shortcut_info->url;
61 if (is_webapk) 61 if (is_webapk)
62 webapk_package_name = ShortcutHelper::QueryWebApkPackage(url); 62 webapk_package_name = ShortcutHelper::QueryWebApkPackage(url);
63 bool is_webapk_already_installed = !webapk_package_name.empty(); 63 bool is_webapk_already_installed = !webapk_package_name.empty();
64 auto infobar_delegate = 64 auto infobar_delegate =
65 base::WrapUnique(new banners::AppBannerInfoBarDelegateAndroid( 65 base::WrapUnique(new banners::AppBannerInfoBarDelegateAndroid(
66 weak_manager, app_title, std::move(shortcut_info), std::move(icon), 66 weak_manager, app_title, std::move(shortcut_info), std::move(icon),
67 event_request_id, is_webapk, is_webapk_already_installed, 67 event_request_id, is_webapk, is_webapk_already_installed,
68 webapk_install_source)); 68 webapk_install_source));
69 auto raw_delegate = infobar_delegate.get(); 69 auto* raw_delegate = infobar_delegate.get();
70 auto infobar = base::MakeUnique<AppBannerInfoBarAndroid>( 70 auto infobar = base::MakeUnique<AppBannerInfoBarAndroid>(
71 std::move(infobar_delegate), url, is_webapk); 71 std::move(infobar_delegate), url, is_webapk);
72 if (!InfoBarService::FromWebContents(web_contents) 72 if (!InfoBarService::FromWebContents(web_contents)
73 ->AddInfoBar(std::move(infobar))) 73 ->AddInfoBar(std::move(infobar)))
74 return false; 74 return false;
75 75
76 if (is_webapk) { 76 if (is_webapk) {
77 if (webapk_install_source == webapk::INSTALL_SOURCE_MENU) { 77 if (webapk_install_source == webapk::INSTALL_SOURCE_MENU) {
78 webapk::TrackInstallInfoBarShown( 78 webapk::TrackInstallInfoBarShown(
79 webapk::WEBAPK_INFOBAR_SHOWN_FROM_MENU); 79 webapk::WEBAPK_INFOBAR_SHOWN_FROM_MENU);
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 473
474 TrackDismissEvent(DISMISS_EVENT_BANNER_CLICK); 474 TrackDismissEvent(DISMISS_EVENT_BANNER_CLICK);
475 return true; 475 return true;
476 } 476 }
477 477
478 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env) { 478 bool RegisterAppBannerInfoBarDelegateAndroid(JNIEnv* env) {
479 return RegisterNativesImpl(env); 479 return RegisterNativesImpl(env);
480 } 480 }
481 481
482 } // namespace banners 482 } // namespace banners
OLDNEW
« no previous file with comments | « base/win/scoped_handle.cc ('k') | chrome/browser/android/instantapps/instant_apps_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698