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/autofill/password_generation_popup_controller_impl.h " | 5 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h " |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 l10n_util::GetStringUTF16(IDS_PASSWORD_GENERATION_PROMPT), | 93 l10n_util::GetStringUTF16(IDS_PASSWORD_GENERATION_PROMPT), |
94 '|', // separator | 94 '|', // separator |
95 &pieces); | 95 &pieces); |
96 DCHECK_EQ(3u, pieces.size()); | 96 DCHECK_EQ(3u, pieces.size()); |
97 link_range_ = gfx::Range(pieces[0].size(), | 97 link_range_ = gfx::Range(pieces[0].size(), |
98 pieces[0].size() + pieces[1].size()); | 98 pieces[0].size() + pieces[1].size()); |
99 help_text_ = JoinString(pieces, base::string16()); | 99 help_text_ = JoinString(pieces, base::string16()); |
100 } | 100 } |
101 | 101 |
102 PasswordGenerationPopupControllerImpl::~PasswordGenerationPopupControllerImpl() | 102 PasswordGenerationPopupControllerImpl::~PasswordGenerationPopupControllerImpl() |
103 {} | 103 {} |
Ilya Sherman
2014/05/30 19:44:22
This change doesn't seem relevant to the thrust of
Evan Stade
2014/05/30 22:50:59
FWIW clang format gives:
PasswordGenerationPopupC
Ilya Sherman
2014/05/30 22:58:33
(As long as we're bikeshedding, the clang format f
Patrick Dubroy
2014/06/02 07:46:52
Done.
| |
104 | 104 |
105 base::WeakPtr<PasswordGenerationPopupControllerImpl> | 105 base::WeakPtr<PasswordGenerationPopupControllerImpl> |
106 PasswordGenerationPopupControllerImpl::GetWeakPtr() { | 106 PasswordGenerationPopupControllerImpl::GetWeakPtr() { |
107 return weak_ptr_factory_.GetWeakPtr(); | 107 return weak_ptr_factory_.GetWeakPtr(); |
108 } | 108 } |
109 | 109 |
110 bool PasswordGenerationPopupControllerImpl::HandleKeyPressEvent( | 110 bool PasswordGenerationPopupControllerImpl::HandleKeyPressEvent( |
111 const content::NativeWebKeyboardEvent& event) { | 111 const content::NativeWebKeyboardEvent& event) { |
112 switch (event.windowsKeyCode) { | 112 switch (event.windowsKeyCode) { |
113 case ui::VKEY_UP: | 113 case ui::VKEY_UP: |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 | 348 |
349 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { | 349 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { |
350 return help_text_; | 350 return help_text_; |
351 } | 351 } |
352 | 352 |
353 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { | 353 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { |
354 return link_range_; | 354 return link_range_; |
355 } | 355 } |
356 | 356 |
357 } // namespace autofill | 357 } // namespace autofill |
OLD | NEW |