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

Side by Side Diff: ios/chrome/browser/experimental_flags.mm

Issue 2106353003: Enable Update Password UI on iOS behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_controller
Patch Set: Override PasswordManagerClient::IsUpdatePasswordUIEnabled Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // This file can be empty. Its purpose is to contain the relatively short lived 5 // This file can be empty. Its purpose is to contain the relatively short lived
6 // definitions required for experimental flags. 6 // definitions required for experimental flags.
7 7
8 #include "ios/chrome/browser/experimental_flags.h" 8 #include "ios/chrome/browser/experimental_flags.h"
9 9
10 #include <dispatch/dispatch.h> 10 #include <dispatch/dispatch.h>
11 #import <Foundation/Foundation.h> 11 #import <Foundation/Foundation.h>
12 12
13 #include <string> 13 #include <string>
14 14
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/metrics/field_trial.h" 16 #include "base/metrics/field_trial.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "components/autofill/core/common/autofill_switches.h" 18 #include "components/autofill/core/common/autofill_switches.h"
19 #include "components/variations/variations_associated_data.h" 19 #include "components/variations/variations_associated_data.h"
20 #include "ios/chrome/browser/chrome_switches.h" 20 #include "ios/chrome/browser/chrome_switches.h"
21 #include "ios/web/public/web_view_creation_util.h" 21 #include "ios/web/public/web_view_creation_util.h"
22 22
23 namespace { 23 namespace {
24 NSString* const kEnableAlertOnBackgroundUpload = 24 NSString* const kEnableAlertOnBackgroundUpload =
25 @"EnableAlertsOnBackgroundUpload"; 25 @"EnableAlertsOnBackgroundUpload";
26 NSString* const kEnableViewCopyPasswords = @"EnableViewCopyPasswords"; 26 NSString* const kEnableViewCopyPasswords = @"EnableViewCopyPasswords";
27 NSString* const kHeuristicsForPasswordGeneration = 27 NSString* const kHeuristicsForPasswordGeneration =
28 @"HeuristicsForPasswordGeneration"; 28 @"HeuristicsForPasswordGeneration";
29 NSString* const kEnableReadingList = @"EnableReadingList"; 29 NSString* const kEnableReadingList = @"EnableReadingList";
30 NSString* const kUpdatePasswordUIEnabled = @"UpdatePasswordUIEnabled";
30 } // namespace 31 } // namespace
31 32
32 namespace experimental_flags { 33 namespace experimental_flags {
33 34
34 bool IsAlertOnBackgroundUploadEnabled() { 35 bool IsAlertOnBackgroundUploadEnabled() {
35 return [[NSUserDefaults standardUserDefaults] 36 return [[NSUserDefaults standardUserDefaults]
36 boolForKey:kEnableAlertOnBackgroundUpload]; 37 boolForKey:kEnableAlertOnBackgroundUpload];
37 } 38 }
38 39
39 bool IsLRUSnapshotCacheEnabled() { 40 bool IsLRUSnapshotCacheEnabled() {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return false; 130 return false;
130 } 131 }
131 132
132 // Check if the finch experiment is turned on 133 // Check if the finch experiment is turned on
133 std::string group_name = 134 std::string group_name =
134 base::FieldTrialList::FindFullName("PhysicalWebEnabled"); 135 base::FieldTrialList::FindFullName("PhysicalWebEnabled");
135 return base::StartsWith(group_name, "Enabled", 136 return base::StartsWith(group_name, "Enabled",
136 base::CompareCase::INSENSITIVE_ASCII); 137 base::CompareCase::INSENSITIVE_ASCII);
137 } 138 }
138 139
140 bool IsUpdatePasswordUIEnabled() {
141 return [[NSUserDefaults standardUserDefaults]
142 boolForKey:kUpdatePasswordUIEnabled];
143 }
144
139 } // namespace experimental_flags 145 } // namespace experimental_flags
OLDNEW
« no previous file with comments | « ios/chrome/browser/experimental_flags.h ('k') | ios/chrome/browser/passwords/ios_chrome_password_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698