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

Side by Side Diff: components/autofill/content/renderer/password_generation_agent.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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 "components/autofill/content/renderer/password_generation_agent.h" 5 #include "components/autofill/content/renderer/password_generation_agent.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 password_agent_(password_agent), 145 password_agent_(password_agent),
146 binding_(this) { 146 binding_(this) {
147 LogBoolean(Logger::STRING_GENERATION_RENDERER_ENABLED, enabled_); 147 LogBoolean(Logger::STRING_GENERATION_RENDERER_ENABLED, enabled_);
148 // PasswordGenerationAgent is guaranteed to outlive |render_frame|. 148 // PasswordGenerationAgent is guaranteed to outlive |render_frame|.
149 render_frame->GetInterfaceRegistry()->AddInterface(base::Bind( 149 render_frame->GetInterfaceRegistry()->AddInterface(base::Bind(
150 &PasswordGenerationAgent::BindRequest, base::Unretained(this))); 150 &PasswordGenerationAgent::BindRequest, base::Unretained(this)));
151 } 151 }
152 PasswordGenerationAgent::~PasswordGenerationAgent() {} 152 PasswordGenerationAgent::~PasswordGenerationAgent() {}
153 153
154 void PasswordGenerationAgent::BindRequest( 154 void PasswordGenerationAgent::BindRequest(
155 const service_manager::BindSourceInfo& source_info,
155 mojom::PasswordGenerationAgentRequest request) { 156 mojom::PasswordGenerationAgentRequest request) {
156 binding_.Bind(std::move(request)); 157 binding_.Bind(std::move(request));
157 } 158 }
158 159
159 void PasswordGenerationAgent::DidFinishDocumentLoad() { 160 void PasswordGenerationAgent::DidFinishDocumentLoad() {
160 // Update stats for main frame navigation. 161 // Update stats for main frame navigation.
161 if (!render_frame()->GetWebFrame()->Parent()) { 162 if (!render_frame()->GetWebFrame()->Parent()) {
162 // In every navigation, the IPC message sent by the password autofill 163 // In every navigation, the IPC message sent by the password autofill
163 // manager to query whether the current form is blacklisted or not happens 164 // manager to query whether the current form is blacklisted or not happens
164 // when the document load finishes, so we need to clear previous states 165 // when the document load finishes, so we need to clear previous states
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 624
624 void PasswordGenerationAgent::LogNumber(Logger::StringID message_id, 625 void PasswordGenerationAgent::LogNumber(Logger::StringID message_id,
625 int number) { 626 int number) {
626 if (!password_agent_->logging_state_active()) 627 if (!password_agent_->logging_state_active())
627 return; 628 return;
628 RendererSavePasswordProgressLogger logger(GetPasswordManagerDriver().get()); 629 RendererSavePasswordProgressLogger logger(GetPasswordManagerDriver().get());
629 logger.LogNumber(message_id, number); 630 logger.LogNumber(message_id, number);
630 } 631 }
631 632
632 } // namespace autofill 633 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698