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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc

Issue 1776673003: Fix the password bubble titles for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the tests Created 4 years, 9 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 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 <string> 10 #include <string>
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 void ManagePasswordsBubbleModel::UpdatePendingStateTitle() { 344 void ManagePasswordsBubbleModel::UpdatePendingStateTitle() {
345 title_brand_link_range_ = gfx::Range(); 345 title_brand_link_range_ = gfx::Range();
346 PasswordTittleType type = 346 PasswordTittleType type =
347 state_ == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE 347 state_ == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE
348 ? PasswordTittleType::UPDATE_PASSWORD 348 ? PasswordTittleType::UPDATE_PASSWORD
349 : (pending_password_.federation_origin.unique() 349 : (pending_password_.federation_origin.unique()
350 ? PasswordTittleType::SAVE_PASSWORD 350 ? PasswordTittleType::SAVE_PASSWORD
351 : PasswordTittleType::SAVE_ACCOUNT); 351 : PasswordTittleType::SAVE_ACCOUNT);
352 GetSavePasswordDialogTitleTextAndLinkRange( 352 GetSavePasswordDialogTitleTextAndLinkRange(
353 web_contents()->GetVisibleURL(), origin(), 353 web_contents()->GetVisibleURL(), origin_,
354 GetSmartLockBrandingState(GetProfile()) != 354 GetSmartLockBrandingState(GetProfile()) !=
355 password_bubble_experiment::SmartLockBranding::NONE, 355 password_bubble_experiment::SmartLockBranding::NONE,
356 type, &title_, &title_brand_link_range_); 356 type, &title_, &title_brand_link_range_);
357 } 357 }
358 358
359 void ManagePasswordsBubbleModel::UpdateManageStateTitle() { 359 void ManagePasswordsBubbleModel::UpdateManageStateTitle() {
360 GetManagePasswordsDialogTitleText(web_contents()->GetVisibleURL(), origin(), 360 GetManagePasswordsDialogTitleText(web_contents()->GetVisibleURL(), origin_,
361 &title_); 361 &title_);
362 } 362 }
363 363
364 metrics_util::UpdatePasswordSubmissionEvent 364 metrics_util::UpdatePasswordSubmissionEvent
365 ManagePasswordsBubbleModel::GetUpdateDismissalReason( 365 ManagePasswordsBubbleModel::GetUpdateDismissalReason(
366 UserBehaviorOnUpdateBubble behavior) const { 366 UserBehaviorOnUpdateBubble behavior) const {
367 static const metrics_util::UpdatePasswordSubmissionEvent update_events[4][3] = 367 static const metrics_util::UpdatePasswordSubmissionEvent update_events[4][3] =
368 {{metrics_util::NO_ACCOUNTS_CLICKED_UPDATE, 368 {{metrics_util::NO_ACCOUNTS_CLICKED_UPDATE,
369 metrics_util::NO_ACCOUNTS_CLICKED_NOPE, 369 metrics_util::NO_ACCOUNTS_CLICKED_NOPE,
370 metrics_util::NO_ACCOUNTS_NO_INTERACTION}, 370 metrics_util::NO_ACCOUNTS_NO_INTERACTION},
(...skipping 13 matching lines...) Expand all
384 return metrics_util::NO_UPDATE_SUBMISSION; 384 return metrics_util::NO_UPDATE_SUBMISSION;
385 } 385 }
386 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) 386 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE)
387 return metrics_util::NO_UPDATE_SUBMISSION; 387 return metrics_util::NO_UPDATE_SUBMISSION;
388 if (password_overridden_) 388 if (password_overridden_)
389 return update_events[3][behavior]; 389 return update_events[3][behavior];
390 if (ShouldShowMultipleAccountUpdateUI()) 390 if (ShouldShowMultipleAccountUpdateUI())
391 return update_events[2][behavior]; 391 return update_events[2][behavior];
392 return update_events[1][behavior]; 392 return update_events[1][behavior];
393 } 393 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_bubble_model.h ('k') | chrome/browser/ui/passwords/manage_passwords_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698