OLD | NEW |
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/ui/webui/options/password_manager_handler.h" | 5 #include "chrome/browser/ui/webui/options/password_manager_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/sync/profile_sync_service.h" | |
17 #include "chrome/browser/sync/profile_sync_service_factory.h" | 16 #include "chrome/browser/sync/profile_sync_service_factory.h" |
18 #if defined(OS_WIN) && defined(USE_ASH) | |
19 #include "chrome/browser/ui/ash/ash_util.h" | |
20 #endif | |
21 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
22 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
23 #include "chrome/grit/generated_resources.h" | 19 #include "chrome/grit/generated_resources.h" |
24 #include "components/autofill/core/common/password_form.h" | 20 #include "components/autofill/core/common/password_form.h" |
25 #include <components/password_manager/core/browser/password_ui_utils.h> | 21 #include "components/browser_sync/browser/profile_sync_service.h" |
26 #include "components/password_manager/core/browser/password_bubble_experiment.h" | 22 #include "components/password_manager/core/browser/password_bubble_experiment.h" |
| 23 #include "components/password_manager/core/browser/password_ui_utils.h" |
27 #include "components/password_manager/core/common/experiments.h" | 24 #include "components/password_manager/core/common/experiments.h" |
28 #include "components/url_formatter/url_formatter.h" | 25 #include "components/url_formatter/url_formatter.h" |
29 #include "content/public/browser/notification_details.h" | 26 #include "content/public/browser/notification_details.h" |
30 #include "content/public/browser/notification_source.h" | 27 #include "content/public/browser/notification_source.h" |
31 #include "content/public/browser/user_metrics.h" | 28 #include "content/public/browser/user_metrics.h" |
32 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
33 #include "content/public/browser/web_ui.h" | 30 #include "content/public/browser/web_ui.h" |
34 #include "content/public/common/content_switches.h" | 31 #include "content/public/common/content_switches.h" |
35 #include "content/public/common/origin_util.h" | 32 #include "content/public/common/origin_util.h" |
36 #include "net/base/net_util.h" | 33 #include "net/base/net_util.h" |
37 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
38 | 35 |
| 36 #if defined(OS_WIN) && defined(USE_ASH) |
| 37 #include "chrome/browser/ui/ash/ash_util.h" |
| 38 #endif |
| 39 |
39 namespace options { | 40 namespace options { |
40 | 41 |
41 namespace { | 42 namespace { |
42 // The following constants should be synchronized with the constants in | 43 // The following constants should be synchronized with the constants in |
43 // chrome/browser/resources/options/password_manager_list.js. | 44 // chrome/browser/resources/options/password_manager_list.js. |
44 const char kOriginField[] = "origin"; | 45 const char kOriginField[] = "origin"; |
45 const char kShownUrlField[] = "shownUrl"; | 46 const char kShownUrlField[] = "shownUrl"; |
46 const char kIsSecureField[] = "isSecure"; | 47 const char kIsSecureField[] = "isSecure"; |
47 const char kUsernameField[] = "username"; | 48 const char kUsernameField[] = "username"; |
48 const char kPasswordField[] = "password"; | 49 const char kPasswordField[] = "password"; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 scoped_ptr<base::DictionaryValue> entry(new base::DictionaryValue); | 256 scoped_ptr<base::DictionaryValue> entry(new base::DictionaryValue); |
256 copyOriginInfoOfPasswordForm(exception, languages_, entry); | 257 copyOriginInfoOfPasswordForm(exception, languages_, entry); |
257 entries.Append(entry.release()); | 258 entries.Append(entry.release()); |
258 } | 259 } |
259 | 260 |
260 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", | 261 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", |
261 entries); | 262 entries); |
262 } | 263 } |
263 | 264 |
264 } // namespace options | 265 } // namespace options |
OLD | NEW |