| Index: chrome/browser/autofill/autocheckout/whitelist_url.cc
|
| diff --git a/chrome/browser/autofill/autocheckout/whitelist_url.cc b/chrome/browser/autofill/autocheckout/whitelist_url.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..35815cef977730813fbce54006d485087e6bcd35
|
| --- /dev/null
|
| +++ b/chrome/browser/autofill/autocheckout/whitelist_url.cc
|
| @@ -0,0 +1,33 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/autofill/autocheckout/whitelist_url.h"
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/command_line.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| +#include "googleurl/src/gurl.h"
|
| +
|
| +namespace {
|
| +
|
| +const char kDefaultAutocheckoutWhitelistUrl[] =
|
| + "http://www.gstatic.com/commerce/autocheckout/whitelist.csv";
|
| +
|
| +} // namespace
|
| +
|
| +namespace autocheckout {
|
| +
|
| +GURL GetAutocheckoutWhitelistUrl() {
|
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| + std::string autocheckoutWhitelistUrl = command_line.GetSwitchValueASCII(
|
| + switches::kAutocheckoutWhitelistUrl);
|
| + if (autocheckoutWhitelistUrl.empty())
|
| + return GURL(kDefaultAutocheckoutWhitelistUrl);
|
| +
|
| + return GURL(autocheckoutWhitelistUrl);
|
| +}
|
| +
|
| +} // namespace autocheckout
|
| +
|
|
|