Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 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/autofill/autocheckout/whitelist_url.h" | |
| 6 | |
| 7 #include <string> | |
| 8 | |
| 9 #include "base/command_line.h" | |
| 10 #include "chrome/common/chrome_switches.h" | |
| 11 #include "googleurl/src/gurl.h" | |
| 12 | |
| 13 namespace { | |
| 14 | |
| 15 const char kDefaultAutocheckoutWhitelistUrl[] = | |
| 16 "http://www.gstatic.com/commerce/autocheckout/whitelist.csv"; | |
| 17 | |
| 18 } // anonymous namespace | |
|
ahutter
2013/01/19 02:07:16
just "namespace"
benquan
2013/01/23 23:50:53
Done.
| |
| 19 | |
| 20 namespace autocheckout { | |
| 21 | |
| 22 GURL GetAutocheckoutWhitelistUrl() { | |
| 23 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | |
| 24 std::string autocheckoutWhitelistUrl = command_line.GetSwitchValueASCII( | |
| 25 switches::kAutocheckoutWhitelistUrl); | |
| 26 if (autocheckoutWhitelistUrl.empty()) | |
| 27 return GURL(kDefaultAutocheckoutWhitelistUrl); | |
| 28 | |
| 29 return GURL(autocheckoutWhitelistUrl); | |
| 30 } | |
| 31 | |
| 32 } // namespace autocheckout | |
| 33 | |
| OLD | NEW |