| 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> |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 #if defined(OS_WIN) | 452 #if defined(OS_WIN) |
| 453 // Desktop to mobile promotion only enabled on windows. | 453 // Desktop to mobile promotion only enabled on windows. |
| 454 if (desktop_ios_promotion::IsEligibleForIOSPromotion( | 454 if (desktop_ios_promotion::IsEligibleForIOSPromotion( |
| 455 prefs, sync_service, | 455 prefs, sync_service, |
| 456 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE)) { | 456 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE)) { |
| 457 interaction_keeper_->ReportInteractions(this); | 457 interaction_keeper_->ReportInteractions(this); |
| 458 title_brand_link_range_ = gfx::Range(); | 458 title_brand_link_range_ = gfx::Range(); |
| 459 title_ = l10n_util::GetStringUTF16( | 459 title_ = l10n_util::GetStringUTF16( |
| 460 IDS_PASSWORD_MANAGER_DESKTOP_TO_IOS_PROMO_TITLE); | 460 IDS_PASSWORD_MANAGER_DESKTOP_TO_IOS_PROMO_TITLE); |
| 461 state_ = password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE; | 461 state_ = password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE; |
| 462 // TODO(crbug.com/676655): Update impression count. | |
| 463 // TODO(crbug.com/676655): Add required logging. | |
| 464 return true; | 462 return true; |
| 465 } | 463 } |
| 466 #endif | 464 #endif |
| 467 return false; | 465 return false; |
| 468 } | 466 } |
| 469 | 467 |
| 470 void ManagePasswordsBubbleModel::SetClockForTesting( | 468 void ManagePasswordsBubbleModel::SetClockForTesting( |
| 471 std::unique_ptr<base::Clock> clock) { | 469 std::unique_ptr<base::Clock> clock) { |
| 472 interaction_keeper_->SetClockForTesting(std::move(clock)); | 470 interaction_keeper_->SetClockForTesting(std::move(clock)); |
| 473 } | 471 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 return metrics_util::NO_UPDATE_SUBMISSION; | 511 return metrics_util::NO_UPDATE_SUBMISSION; |
| 514 } | 512 } |
| 515 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) | 513 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) |
| 516 return metrics_util::NO_UPDATE_SUBMISSION; | 514 return metrics_util::NO_UPDATE_SUBMISSION; |
| 517 if (password_overridden_) | 515 if (password_overridden_) |
| 518 return update_events[3][behavior]; | 516 return update_events[3][behavior]; |
| 519 if (ShouldShowMultipleAccountUpdateUI()) | 517 if (ShouldShowMultipleAccountUpdateUI()) |
| 520 return update_events[2][behavior]; | 518 return update_events[2][behavior]; |
| 521 return update_events[1][behavior]; | 519 return update_events[1][behavior]; |
| 522 } | 520 } |
| OLD | NEW |