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

Unified Diff: chrome/browser/ui/views/payments/payment_request_views_util.cc

Issue 2784973002: Move string helper functions to components/core for iOS use. (Closed)
Patch Set: Deps, part 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/payment_request_views_util.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.cc b/chrome/browser/ui/views/payments/payment_request_views_util.cc
index 9cddbeb849aaf14b3d45045c0f70286672e276ed..fcd9ac333902a35fd9d1ba33847f86fcdb524459 100644
--- a/chrome/browser/ui/views/payments/payment_request_views_util.cc
+++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
@@ -18,7 +18,6 @@
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/payments/core/payment_options_provider.h"
-#include "components/strings/grit/components_strings.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -270,36 +269,6 @@ std::unique_ptr<views::Label> CreateBoldLabel(const base::string16& text) {
return label;
}
-base::string16 GetShippingAddressSectionString(
- PaymentShippingType shipping_type) {
- switch (shipping_type) {
- case PaymentShippingType::DELIVERY:
- return l10n_util::GetStringUTF16(IDS_PAYMENTS_DELIVERY_ADDRESS_LABEL);
- case PaymentShippingType::PICKUP:
- return l10n_util::GetStringUTF16(IDS_PAYMENTS_PICKUP_ADDRESS_LABEL);
- case PaymentShippingType::SHIPPING:
- return l10n_util::GetStringUTF16(IDS_PAYMENTS_SHIPPING_ADDRESS_LABEL);
- }
- // MSVC doesn't compile with only the above switch statement because it can't
- // see that all control paths return a value.
- return l10n_util::GetStringUTF16(IDS_PAYMENTS_SHIPPING_ADDRESS_LABEL);
-}
-
-base::string16 GetShippingOptionSectionString(
- PaymentShippingType shipping_type) {
- switch (shipping_type) {
- case PaymentShippingType::DELIVERY:
- return l10n_util::GetStringUTF16(IDS_PAYMENTS_DELIVERY_OPTION_LABEL);
- case PaymentShippingType::PICKUP:
- return l10n_util::GetStringUTF16(IDS_PAYMENTS_PICKUP_OPTION_LABEL);
- case PaymentShippingType::SHIPPING:
- return l10n_util::GetStringUTF16(IDS_PAYMENTS_SHIPPING_OPTION_LABEL);
- }
- // MSVC doesn't compile with only the above switch statement because it can't
- // see that all control paths return a value.
- return l10n_util::GetStringUTF16(IDS_PAYMENTS_SHIPPING_OPTION_LABEL);
-}
-
std::unique_ptr<views::View> CreateShippingOptionLabel(
payments::mojom::PaymentShippingOption* shipping_option,
const base::string16& formatted_amount) {

Powered by Google App Engine
This is Rietveld 408576698