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

Side by Side Diff: chrome/browser/password_manager/psl_matching_helper.cc

Issue 134303003: Reland: Password manager: Gnome support for Public Suffix List matching (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add scoped_ptr Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/password_manager/native_backend_gnome_x_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/password_manager/psl_matching_helper.h" 5 #include "chrome/browser/password_manager/psl_matching_helper.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 "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); 48 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
49 } 49 }
50 50
51 // static 51 // static
52 void PSLMatchingHelper::EnablePublicSuffixDomainMatchingForTesting() { 52 void PSLMatchingHelper::EnablePublicSuffixDomainMatchingForTesting() {
53 psl_enabled_override_ = true; 53 psl_enabled_override_ = true;
54 } 54 }
55 55
56 // static 56 // static
57 bool PSLMatchingHelper::DeterminePSLEnabled() { 57 bool PSLMatchingHelper::DeterminePSLEnabled() {
58 #if defined(OS_ANDROID) || defined(OS_WIN) 58 #if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_LINUX)
59 // Default choice is "enabled", so we do not need to check for 59 // Default choice is "enabled", so we do not need to check for
60 // kEnablePasswordAutofillPublicSuffixDomainMatching. 60 // kEnablePasswordAutofillPublicSuffixDomainMatching.
61 bool enabled = true; 61 bool enabled = true;
62 if (CommandLine::ForCurrentProcess()->HasSwitch( 62 if (CommandLine::ForCurrentProcess()->HasSwitch(
63 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)) { 63 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)) {
64 enabled = false; 64 enabled = false;
65 } 65 }
66 return enabled; 66 return enabled;
67 #else 67 #else
68 return false; 68 return false;
69 #endif 69 #endif
70 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/native_backend_gnome_x_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698