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

Side by Side Diff: components/autofill/browser/autocheckout/whitelist_manager.cc

Issue 13811045: Autofill:Autocheckout: Enable Autocheckout for finch experimenting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | components/autofill/browser/autofill_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 #include "components/autofill/browser/autocheckout/whitelist_manager.h" 5 #include "components/autofill/browser/autocheckout/whitelist_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/field_trial.h"
10 #include "base/string_util.h" 11 #include "base/string_util.h"
11 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
12 #include "components/autofill/common/autofill_switches.h" 13 #include "components/autofill/common/autofill_switches.h"
13 #include "content/public/browser/browser_context.h" 14 #include "content/public/browser/browser_context.h"
14 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
15 #include "net/base/load_flags.h" 16 #include "net/base/load_flags.h"
16 #include "net/http/http_status_code.h" 17 #include "net/http/http_status_code.h"
17 #include "net/url_request/url_fetcher.h" 18 #include "net/url_request/url_fetcher.h"
18 #include "net/url_request/url_request_context_getter.h" 19 #include "net/url_request/url_request_context_getter.h"
19 20
(...skipping 14 matching lines...) Expand all
34 } // namespace 35 } // namespace
35 36
36 37
37 namespace autofill { 38 namespace autofill {
38 namespace autocheckout { 39 namespace autocheckout {
39 40
40 WhitelistManager::WhitelistManager() 41 WhitelistManager::WhitelistManager()
41 : callback_is_pending_(false), 42 : callback_is_pending_(false),
42 experimental_form_filling_enabled_( 43 experimental_form_filling_enabled_(
43 CommandLine::ForCurrentProcess()->HasSwitch( 44 CommandLine::ForCurrentProcess()->HasSwitch(
44 switches::kEnableExperimentalFormFilling)), 45 switches::kEnableExperimentalFormFilling) ||
46 base::FieldTrialList::FindFullName("Autocheckout") == "Yes"),
45 bypass_autocheckout_whitelist_( 47 bypass_autocheckout_whitelist_(
46 CommandLine::ForCurrentProcess()->HasSwitch( 48 CommandLine::ForCurrentProcess()->HasSwitch(
47 switches::kBypassAutocheckoutWhitelist)) { 49 switches::kBypassAutocheckoutWhitelist)) {
48 } 50 }
49 51
50 WhitelistManager::~WhitelistManager() {} 52 WhitelistManager::~WhitelistManager() {}
51 53
52 void WhitelistManager::Init(net::URLRequestContextGetter* context_getter) { 54 void WhitelistManager::Init(net::URLRequestContextGetter* context_getter) {
53 DCHECK(context_getter); 55 DCHECK(context_getter);
54 context_getter_ = context_getter; 56 context_getter_ = context_getter;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // Chrome can ignore them and continue to work. 142 // Chrome can ignore them and continue to work.
141 if (!fields[0].empty()) 143 if (!fields[0].empty())
142 new_url_prefixes.push_back(fields[0]); 144 new_url_prefixes.push_back(fields[0]);
143 } 145 }
144 } 146 }
145 url_prefixes_ = new_url_prefixes; 147 url_prefixes_ = new_url_prefixes;
146 } 148 }
147 149
148 } // namespace autocheckout 150 } // namespace autocheckout
149 } // namespace autofill 151 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698