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/passwords/manage_passwords_bubble_model.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <limits> | 10 #include <limits> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/time/default_clock.h" | 16 #include "base/time/default_clock.h" |
17 #include "chrome/browser/password_manager/password_store_factory.h" | 17 #include "chrome/browser/password_manager/password_store_factory.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/sync/profile_sync_service_factory.h" | 19 #include "chrome/browser/sync/profile_sync_service_factory.h" |
20 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" | 20 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" |
21 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" | 21 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" |
22 #include "chrome/grit/chromium_strings.h" | |
23 #include "chrome/grit/generated_resources.h" | 22 #include "chrome/grit/generated_resources.h" |
24 #include "components/browser_sync/profile_sync_service.h" | 23 #include "components/browser_sync/profile_sync_service.h" |
25 #include "components/password_manager/core/browser/password_bubble_experiment.h" | 24 #include "components/password_manager/core/browser/password_bubble_experiment.h" |
26 #include "components/password_manager/core/browser/password_manager_constants.h" | 25 #include "components/password_manager/core/browser/password_manager_constants.h" |
27 #include "components/password_manager/core/browser/password_store.h" | 26 #include "components/password_manager/core/browser/password_store.h" |
28 #include "components/password_manager/core/common/password_manager_pref_names.h" | 27 #include "components/password_manager/core/common/password_manager_pref_names.h" |
29 #include "components/password_manager/core/common/password_manager_ui.h" | 28 #include "components/password_manager/core/common/password_manager_ui.h" |
30 #include "components/prefs/pref_service.h" | 29 #include "components/prefs/pref_service.h" |
31 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
32 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 return metrics_util::NO_UPDATE_SUBMISSION; | 520 return metrics_util::NO_UPDATE_SUBMISSION; |
522 } | 521 } |
523 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) | 522 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) |
524 return metrics_util::NO_UPDATE_SUBMISSION; | 523 return metrics_util::NO_UPDATE_SUBMISSION; |
525 if (password_overridden_) | 524 if (password_overridden_) |
526 return update_events[3][behavior]; | 525 return update_events[3][behavior]; |
527 if (ShouldShowMultipleAccountUpdateUI()) | 526 if (ShouldShowMultipleAccountUpdateUI()) |
528 return update_events[2][behavior]; | 527 return update_events[2][behavior]; |
529 return update_events[1][behavior]; | 528 return update_events[1][behavior]; |
530 } | 529 } |
OLD | NEW |