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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/input_method/input_method_manager_impl.h" 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
6 6
7 #include <algorithm> // std::find 7 #include <algorithm> // std::find
8 8
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 } 603 }
604 604
605 if (layout.empty()) 605 if (layout.empty())
606 return; 606 return;
607 607
608 std::vector<std::string> layouts; 608 std::vector<std::string> layouts;
609 base::SplitString(layout, ',', &layouts); 609 base::SplitString(layout, ',', &layouts);
610 manager_->MigrateInputMethods(&layouts); 610 manager_->MigrateInputMethods(&layouts);
611 611
612 PrefService* prefs = g_browser_process->local_state(); 612 PrefService* prefs = g_browser_process->local_state();
613 prefs->SetString(prefs::kHardwareKeyboardLayout, JoinString(layouts, ",")); 613 prefs->SetString(prefs::kHardwareKeyboardLayout,
614 base::JoinString(layouts, ","));
614 615
615 // This asks the file thread to save the prefs (i.e. doesn't block). 616 // This asks the file thread to save the prefs (i.e. doesn't block).
616 // The latest values of Local State reside in memory so we can safely 617 // The latest values of Local State reside in memory so we can safely
617 // get the value of kHardwareKeyboardLayout even if the data is not 618 // get the value of kHardwareKeyboardLayout even if the data is not
618 // yet saved to disk. 619 // yet saved to disk.
619 prefs->CommitPendingWrite(); 620 prefs->CommitPendingWrite();
620 621
621 manager_->util_.UpdateHardwareLayoutCache(); 622 manager_->util_.UpdateHardwareLayoutCache();
622 623
623 EnableLoginLayouts(locale, layouts); 624 EnableLoginLayouts(locale, layouts);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 if (candidate_window_controller_.get()) 1167 if (candidate_window_controller_.get())
1167 return; 1168 return;
1168 1169
1169 candidate_window_controller_.reset( 1170 candidate_window_controller_.reset(
1170 CandidateWindowController::CreateCandidateWindowController()); 1171 CandidateWindowController::CreateCandidateWindowController());
1171 candidate_window_controller_->AddObserver(this); 1172 candidate_window_controller_->AddObserver(this);
1172 } 1173 }
1173 1174
1174 } // namespace input_method 1175 } // namespace input_method
1175 } // namespace chromeos 1176 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698