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

Side by Side Diff: chrome/browser/password_manager/password_manager.cc

Issue 8469015: Switch BackgroundContents to use TabContents instead of RenderViewHost. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix unittest Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/password_manager/password_manager.h" 5 #include "chrome/browser/password_manager/password_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 if (provisional_save_manager_->IsNewLogin()) { 150 if (provisional_save_manager_->IsNewLogin()) {
151 delegate_->AddSavePasswordInfoBar(provisional_save_manager_.release()); 151 delegate_->AddSavePasswordInfoBar(provisional_save_manager_.release());
152 } else { 152 } else {
153 // If the save is not a new username entry, then we just want to save this 153 // If the save is not a new username entry, then we just want to save this
154 // data (since the user already has related data saved), so don't prompt. 154 // data (since the user already has related data saved), so don't prompt.
155 provisional_save_manager_->Save(); 155 provisional_save_manager_->Save();
156 provisional_save_manager_.reset(); 156 provisional_save_manager_.reset();
157 } 157 }
158 } 158 }
159 159
160 void PasswordManager::DidNavigateAnyFramePostCommit( 160 void PasswordManager::DidNavigateAnyFrame(
161 const content::LoadCommittedDetails& details, 161 const content::LoadCommittedDetails& details,
162 const ViewHostMsg_FrameNavigate_Params& params) { 162 const ViewHostMsg_FrameNavigate_Params& params) {
163 if (params.password_form.origin.is_valid()) 163 if (params.password_form.origin.is_valid())
164 ProvisionallySavePassword(params.password_form); 164 ProvisionallySavePassword(params.password_form);
165 } 165 }
166 166
167 bool PasswordManager::OnMessageReceived(const IPC::Message& message) { 167 bool PasswordManager::OnMessageReceived(const IPC::Message& message) {
168 bool handled = true; 168 bool handled = true;
169 IPC_BEGIN_MESSAGE_MAP(PasswordManager, message) 169 IPC_BEGIN_MESSAGE_MAP(PasswordManager, message)
170 IPC_MESSAGE_HANDLER(AutofillHostMsg_PasswordFormsFound, 170 IPC_MESSAGE_HANDLER(AutofillHostMsg_PasswordFormsFound,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 delegate_->FillPasswordForm(fill_data); 234 delegate_->FillPasswordForm(fill_data);
235 return; 235 return;
236 } 236 }
237 default: 237 default:
238 if (observer_) { 238 if (observer_) {
239 observer_->OnAutofillDataAvailable(preferred_match->username_value, 239 observer_->OnAutofillDataAvailable(preferred_match->username_value,
240 preferred_match->password_value); 240 preferred_match->password_value);
241 } 241 }
242 } 242 }
243 } 243 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_manager.h ('k') | chrome/browser/safe_browsing/client_side_detection_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698