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

Side by Side Diff: chrome/browser/payments/payment_request_factory.cc

Issue 2611253004: [Payment Request] Change the lifetime management of PaymentRequestImpl (Closed)
Patch Set: added a browser test Created 3 years, 11 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
please use gerrit instead 2017/01/06 21:49:09 2017
Mathieu 2017/01/07 05:03:07 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/payments/payment_request_factory.h"
6
7 #include <memory>
8
9 #include "chrome/browser/payments/chrome_payment_request_delegate.h"
10 #include "components/payments/payment_request_delegate.h"
11 #include "components/payments/payment_request_web_contents_manager.h"
12 #include "content/public/browser/web_contents.h"
13
14 namespace payments {
15
16 void CreatePaymentRequestForWebContents(
17 content::WebContents* web_contents,
18 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request) {
19 DCHECK(web_contents);
please use gerrit instead 2017/01/06 21:49:09 #include "base/logging.h"
Mathieu 2017/01/07 05:03:07 Done.
20 PaymentRequestWebContentsManager* web_contents_manager =
21 PaymentRequestWebContentsManager::GetOrCreateForWebContents(web_contents);
22
23 std::unique_ptr<PaymentRequestDelegate> delegate(
24 new ChromePaymentRequestDelegate());
25 web_contents_manager->CreatePaymentRequestImpl(
26 web_contents, std::move(delegate), std::move(request));
please use gerrit instead 2017/01/06 21:49:09 Would a single statement be easier to understand?
Mathieu 2017/01/07 05:03:07 Done. good suggestion!
27 }
28
29 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698