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

Side by Side Diff: chrome/browser/ui/android/autofill/autofill_dialog_result.h

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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_ 5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_
6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_ 6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9
10 #include <memory>
9 #include <string> 11 #include <string>
10 12
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
14 15
15 namespace autofill { 16 namespace autofill {
16 namespace wallet { 17 namespace wallet {
17 class FullWallet; 18 class FullWallet;
18 } 19 }
19 } 20 }
20 21
21 namespace autofill { 22 namespace autofill {
22 23
23 // A result of the non-cancelled Java-side AutofillDialog invocation. 24 // A result of the non-cancelled Java-side AutofillDialog invocation.
24 // Passed to the AutofillDialogControllerAndroid in dialogContinue. 25 // Passed to the AutofillDialogControllerAndroid in dialogContinue.
25 class AutofillDialogResult { 26 class AutofillDialogResult {
26 public: 27 public:
27 // Converts the requested information to wallet::FullWallet. 28 // Converts the requested information to wallet::FullWallet.
28 // The dialog stores the requested information in the same format 29 // The dialog stores the requested information in the same format
29 // regardless if the information was obtained from Autofill or Google Wallet. 30 // regardless if the information was obtained from Autofill or Google Wallet.
30 static scoped_ptr<wallet::FullWallet> ConvertFromJava( 31 static std::unique_ptr<wallet::FullWallet> ConvertFromJava(JNIEnv* env,
31 JNIEnv* env, jobject wallet); 32 jobject wallet);
32 33
33 // Returns the email address to be associated with this request, 34 // Returns the email address to be associated with this request,
34 // or an empty string. 35 // or an empty string.
35 static base::string16 GetWalletEmail(JNIEnv* env, jobject wallet); 36 static base::string16 GetWalletEmail(JNIEnv* env, jobject wallet);
36 37
37 // Returns the Google Transaction ID to be associated with this request, 38 // Returns the Google Transaction ID to be associated with this request,
38 // or an empty string. 39 // or an empty string.
39 static std::string GetWalletGoogleTransactionId(JNIEnv* env, jobject wallet); 40 static std::string GetWalletGoogleTransactionId(JNIEnv* env, jobject wallet);
40 41
41 // Establishes JNI bindings. 42 // Establishes JNI bindings.
42 static bool RegisterAutofillDialogResult(JNIEnv* env); 43 static bool RegisterAutofillDialogResult(JNIEnv* env);
43 44
44 private: 45 private:
45 DISALLOW_COPY_AND_ASSIGN(AutofillDialogResult); 46 DISALLOW_COPY_AND_ASSIGN(AutofillDialogResult);
46 }; 47 };
47 48
48 } // namespace autofill 49 } // namespace autofill
49 50
50 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_ 51 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698