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

Unified Diff: chrome/browser/autofill/autocheckout/whitelist_url.cc

Issue 11867025: Download autocheckout whitelist and enable autocheckout for whitelisted sites only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert code change for manual testing/:wq. Created 7 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 side-by-side diff with in-line comments
Download patch
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
+

Powered by Google App Engine
This is Rietveld 408576698