| OLD | NEW |
| 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 "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
| 8 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 8 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/password_manager/password_store_factory.h" | 10 #include "chrome/browser/password_manager/password_store_factory.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 #endif | 167 #endif |
| 168 } | 168 } |
| 169 | 169 |
| 170 void ManagePasswordsUIController::NavigateToAccountCentralManagementPage() { | 170 void ManagePasswordsUIController::NavigateToAccountCentralManagementPage() { |
| 171 // TODO(gcasto): FindBowserWithWebContents() doesn't exist on Android. | 171 // TODO(gcasto): FindBowserWithWebContents() doesn't exist on Android. |
| 172 // Need to determine how this should work there. | 172 // Need to determine how this should work there. |
| 173 #if !defined(OS_ANDROID) | 173 #if !defined(OS_ANDROID) |
| 174 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); | 174 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); |
| 175 content::OpenURLParams params( | 175 content::OpenURLParams params( |
| 176 GURL(chrome::kAutoPasswordGenerationLearnMoreURL), content::Referrer(), | 176 GURL(chrome::kAutoPasswordGenerationLearnMoreURL), content::Referrer(), |
| 177 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false); | 177 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false); |
| 178 browser->OpenURL(params); | 178 browser->OpenURL(params); |
| 179 #endif | 179 #endif |
| 180 } | 180 } |
| 181 | 181 |
| 182 void ManagePasswordsUIController::SavePassword() { | 182 void ManagePasswordsUIController::SavePassword() { |
| 183 DCHECK(PasswordPendingUserDecision()); | 183 DCHECK(PasswordPendingUserDecision()); |
| 184 SavePasswordInternal(); | 184 SavePasswordInternal(); |
| 185 state_ = password_manager::ui::MANAGE_STATE; | 185 state_ = password_manager::ui::MANAGE_STATE; |
| 186 UpdateBubbleAndIconVisibility(); | 186 UpdateBubbleAndIconVisibility(); |
| 187 } | 187 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 return; | 278 return; |
| 279 CommandUpdater* updater = browser->command_controller()->command_updater(); | 279 CommandUpdater* updater = browser->command_controller()->command_updater(); |
| 280 updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE); | 280 updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE); |
| 281 #endif | 281 #endif |
| 282 } | 282 } |
| 283 | 283 |
| 284 bool ManagePasswordsUIController::PasswordPendingUserDecision() const { | 284 bool ManagePasswordsUIController::PasswordPendingUserDecision() const { |
| 285 return state_ == password_manager::ui::PENDING_PASSWORD_STATE || | 285 return state_ == password_manager::ui::PENDING_PASSWORD_STATE || |
| 286 state_ == password_manager::ui::PENDING_PASSWORD_AND_BUBBLE_STATE; | 286 state_ == password_manager::ui::PENDING_PASSWORD_AND_BUBBLE_STATE; |
| 287 } | 287 } |
| OLD | NEW |