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

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

Issue 2656453002: Remove password manager's dependency of BrowsingDataHelper (Closed)
Patch Set: s/spec/possibly_invalid_spec/ Created 3 years, 11 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
« no previous file with comments | « chrome/browser/password_manager/chrome_password_manager_client_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ui_controller.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 void ManagePasswordsUIController::NeverSavePasswordInternal() { 375 void ManagePasswordsUIController::NeverSavePasswordInternal() {
376 password_manager::PasswordFormManager* form_manager = 376 password_manager::PasswordFormManager* form_manager =
377 passwords_data_.form_manager(); 377 passwords_data_.form_manager();
378 DCHECK(form_manager); 378 DCHECK(form_manager);
379 form_manager->OnNeverClicked(); 379 form_manager->OnNeverClicked();
380 } 380 }
381 381
382 void ManagePasswordsUIController::UpdateBubbleAndIconVisibility() { 382 void ManagePasswordsUIController::UpdateBubbleAndIconVisibility() {
383 // If we're not on a "webby" URL (e.g. "chrome://sign-in"), we shouldn't 383 // If we're not on a "webby" URL (e.g. "chrome://sign-in"), we shouldn't
384 // display either the bubble or the icon. 384 // display either the bubble or the icon.
385 if (!BrowsingDataHelper::IsWebScheme( 385 if (!ChromePasswordManagerClient::CanShowBubbleOnURL(
386 web_contents()->GetLastCommittedURL().scheme())) { 386 web_contents()->GetLastCommittedURL())) {
387 passwords_data_.OnInactive(); 387 passwords_data_.OnInactive();
388 } 388 }
389 389
390 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); 390 Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
391 if (!browser) 391 if (!browser)
392 return; 392 return;
393 LocationBar* location_bar = browser->window()->GetLocationBar(); 393 LocationBar* location_bar = browser->window()->GetLocationBar();
394 DCHECK(location_bar); 394 DCHECK(location_bar);
395 location_bar->UpdateManagePasswordsIconAndBubble(); 395 location_bar->UpdateManagePasswordsIconAndBubble();
396 } 396 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE); 447 passwords_data_.TransitionToState(password_manager::ui::MANAGE_STATE);
448 } 448 }
449 } 449 }
450 450
451 void ManagePasswordsUIController::WebContentsDestroyed() { 451 void ManagePasswordsUIController::WebContentsDestroyed() {
452 password_manager::PasswordStore* password_store = 452 password_manager::PasswordStore* password_store =
453 GetPasswordStore(web_contents()); 453 GetPasswordStore(web_contents());
454 if (password_store) 454 if (password_store)
455 password_store->RemoveObserver(this); 455 password_store->RemoveObserver(this);
456 } 456 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/chrome_password_manager_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698