summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkomatsu@chromium.org <komatsu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-26 03:18:38 +0000
committerkomatsu@chromium.org <komatsu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-26 03:18:38 +0000
commitae20ac8c99f45c40aa2a4d32cb07e0295802993b (patch)
tree772dec86fb62dc00571cb39205c77074620958a7
parenteb87d989280b0d735e0f7198d3aa08fe6918b7fe (diff)
downloadchromium_src-ae20ac8c99f45c40aa2a4d32cb07e0295802993b.zip
chromium_src-ae20ac8c99f45c40aa2a4d32cb07e0295802993b.tar.gz
chromium_src-ae20ac8c99f45c40aa2a4d32cb07e0295802993b.tar.bz2
Use pointer instead of reference for a function argument.
BUG=N/A Review URL: https://codereview.chromium.org/85753002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237234 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager_impl.cc11
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager_impl.h2
2 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
index 124d788..2455357 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -192,14 +192,15 @@ void InputMethodManagerImpl::EnableLayouts(const std::string& language_code,
// Adds new input method to given list.
bool InputMethodManagerImpl::EnableInputMethodImpl(
const std::string& input_method_id,
- std::vector<std::string>& new_active_input_method_ids) const {
+ std::vector<std::string>* new_active_input_method_ids) const {
+ DCHECK(new_active_input_method_ids);
if (!util_.IsValidInputMethodId(input_method_id)) {
DVLOG(1) << "EnableInputMethod: Invalid ID: " << input_method_id;
return false;
}
- if (!Contains(new_active_input_method_ids, input_method_id))
- new_active_input_method_ids.push_back(input_method_id);
+ if (!Contains(*new_active_input_method_ids, input_method_id))
+ new_active_input_method_ids->push_back(input_method_id);
return true;
}
@@ -221,7 +222,7 @@ void InputMethodManagerImpl::ReconfigureIMFramework() {
bool InputMethodManagerImpl::EnableInputMethod(
const std::string& input_method_id) {
- if (!EnableInputMethodImpl(input_method_id, active_input_method_ids_))
+ if (!EnableInputMethodImpl(input_method_id, &active_input_method_ids_))
return false;
ReconfigureIMFramework();
@@ -238,7 +239,7 @@ bool InputMethodManagerImpl::EnableInputMethods(
for (size_t i = 0; i < new_active_input_method_ids.size(); ++i)
EnableInputMethodImpl(new_active_input_method_ids[i],
- new_active_input_method_ids_filtered);
+ &new_active_input_method_ids_filtered);
if (new_active_input_method_ids_filtered.empty()) {
DVLOG(1) << "EnableInputMethods: No valid input method ID";
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.h b/chrome/browser/chromeos/input_method/input_method_manager_impl.h
index a13fa6d..7e779ab 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.h
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.h
@@ -156,7 +156,7 @@ class InputMethodManagerImpl : public InputMethodManager,
// Adds new input method to given list if possible
bool EnableInputMethodImpl(
const std::string& input_method_id,
- std::vector<std::string>& new_active_input_method_ids) const;
+ std::vector<std::string>* new_active_input_method_ids) const;
// Starts or stops the system input method framework as needed.
// (after list of enabled input methods has been updated)