Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / components / password_manager / core / browser / password_manager_client.cc
1 // Copyright 2014 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 "components/password_manager/core/browser/password_manager_client.h"
6
7 namespace password_manager {
8
9 bool PasswordManagerClient::IsAutomaticPasswordSavingEnabled() const {
10   return false;
11 }
12
13 bool PasswordManagerClient::IsPasswordManagerEnabledForCurrentPage() const {
14   return true;
15 }
16
17 base::FieldTrial::Probability
18 PasswordManagerClient::GetProbabilityForExperiment(
19     const std::string& experiment_name) {
20   return 0;
21 }
22
23 bool PasswordManagerClient::IsPasswordSyncEnabled(CustomPassphraseState state) {
24   return false;
25 }
26
27 void PasswordManagerClient::OnLogRouterAvailabilityChanged(
28     bool router_can_be_used) {
29 }
30
31 void PasswordManagerClient::LogSavePasswordProgress(const std::string& text) {
32 }
33
34 bool PasswordManagerClient::IsLoggingActive() const {
35   return false;
36 }
37
38 PasswordStore::AuthorizationPromptPolicy
39 PasswordManagerClient::GetAuthorizationPromptPolicy(
40     const autofill::PasswordForm& form) {
41   // Password Autofill is supposed to be a convenience. If it creates a
42   // blocking dialog, it is no longer convenient. We should only prompt the
43   // user after a full username has been typed in. Until that behavior is
44   // implemented, never prompt the user for keychain access.
45   // Effectively, this means that passwords stored by Chrome still work,
46   // since Chrome can access those without a prompt, but passwords stored by
47   // Safari, Firefox, or Chrome Canary will not work. Note that the latest
48   // build of Safari and Firefox don't create keychain items with the
49   // relevant tags anyways (7/11/2014).
50   // http://crbug.com/178358
51   return PasswordStore::DISALLOW_PROMPT;
52 }
53
54 }  // namespace password_manager