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

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

Issue 1723583004: CREDENTIAL: Convert federations from URLs to origins throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return !prefs->GetBoolean( 349 return !prefs->GetBoolean(
350 password_manager::prefs::kWasSavePrompFirstRunExperienceShown); 350 password_manager::prefs::kWasSavePrompFirstRunExperienceShown);
351 } 351 }
352 return false; 352 return false;
353 } 353 }
354 354
355 void ManagePasswordsBubbleModel::UpdatePendingStateTitle() { 355 void ManagePasswordsBubbleModel::UpdatePendingStateTitle() {
356 title_brand_link_range_ = gfx::Range(); 356 title_brand_link_range_ = gfx::Range();
357 PasswordTittleType type = 357 PasswordTittleType type =
358 state_ == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE 358 state_ == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE
359 ? PasswordTittleType::UPDATE_PASSWORD 359 ? PasswordTittleType::UPDATE_PASSWORD
360 : (pending_password_.federation_url.is_empty() 360 : (pending_password_.federation_origin.unique()
361 ? PasswordTittleType::SAVE_PASSWORD 361 ? PasswordTittleType::SAVE_PASSWORD
362 : PasswordTittleType::SAVE_ACCOUNT); 362 : PasswordTittleType::SAVE_ACCOUNT);
363 GetSavePasswordDialogTitleTextAndLinkRange( 363 GetSavePasswordDialogTitleTextAndLinkRange(
364 web_contents()->GetVisibleURL(), origin(), 364 web_contents()->GetVisibleURL(), origin(),
365 GetSmartLockBrandingState(GetProfile()) != 365 GetSmartLockBrandingState(GetProfile()) !=
366 password_bubble_experiment::SmartLockBranding::NONE, 366 password_bubble_experiment::SmartLockBranding::NONE,
367 type, &title_, &title_brand_link_range_); 367 type, &title_, &title_brand_link_range_);
368 } 368 }
369 369
370 void ManagePasswordsBubbleModel::UpdateManageStateTitle() { 370 void ManagePasswordsBubbleModel::UpdateManageStateTitle() {
371 GetManagePasswordsDialogTitleText(web_contents()->GetVisibleURL(), origin(), 371 GetManagePasswordsDialogTitleText(web_contents()->GetVisibleURL(), origin(),
372 &title_); 372 &title_);
(...skipping 22 matching lines...) Expand all
395 return metrics_util::NO_UPDATE_SUBMISSION; 395 return metrics_util::NO_UPDATE_SUBMISSION;
396 } 396 }
397 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE) 397 if (state_ != password_manager::ui::PENDING_PASSWORD_UPDATE_STATE)
398 return metrics_util::NO_UPDATE_SUBMISSION; 398 return metrics_util::NO_UPDATE_SUBMISSION;
399 if (password_overridden_) 399 if (password_overridden_)
400 return update_events[3][behavior]; 400 return update_events[3][behavior];
401 if (ShouldShowMultipleAccountUpdateUI()) 401 if (ShouldShowMultipleAccountUpdateUI())
402 return update_events[2][behavior]; 402 return update_events[2][behavior];
403 return update_events[1][behavior]; 403 return update_events[1][behavior];
404 } 404 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698