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

Side by Side Diff: chrome/browser/chromeos/preferences.cc

Issue 7621037: Fix the build break of preferences.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include "base/i18n/time_formatting.h" 7 #include "base/i18n/time_formatting.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 iter != virtual_keyboard_pref->end_keys(); 581 iter != virtual_keyboard_pref->end_keys();
582 ++iter) { 582 ++iter) {
583 const std::string& layout_id = *iter; // e.g. "us", "handwriting-vk" 583 const std::string& layout_id = *iter; // e.g. "us", "handwriting-vk"
584 if (!virtual_keyboard_pref->GetString(layout_id, &url)) 584 if (!virtual_keyboard_pref->GetString(layout_id, &url))
585 continue; 585 continue;
586 if (!input_method_manager->SetVirtualKeyboardPreference( 586 if (!input_method_manager->SetVirtualKeyboardPreference(
587 layout_id, GURL(url))) { 587 layout_id, GURL(url))) {
588 // Either |layout_id| or |url| is invalid. Remove the key from |prefs| 588 // Either |layout_id| or |url| is invalid. Remove the key from |prefs|
589 // later. 589 // later.
590 layouts_to_remove.push_back(layout_id); 590 layouts_to_remove.push_back(layout_id);
591 LOG(ERROR) << "Removing invalid virtual keyboard pref: layout=" << layout; 591 LOG(ERROR) << "Removing invalid virtual keyboard pref: layout="
592 << layout_id;
592 } 593 }
593 } 594 }
594 595
595 // Remove invalid prefs. 596 // Remove invalid prefs.
596 DictionaryPrefUpdate updater(prefs, prefs::kLanguagePreferredVirtualKeyboard); 597 DictionaryPrefUpdate updater(prefs, prefs::kLanguagePreferredVirtualKeyboard);
597 DictionaryValue* pref_value = updater.Get(); 598 DictionaryValue* pref_value = updater.Get();
598 for (size_t i = 0; i < layouts_to_remove.size(); ++i) { 599 for (size_t i = 0; i < layouts_to_remove.size(); ++i) {
599 pref_value->RemoveWithoutPathExpansion(layouts_to_remove[i], NULL); 600 pref_value->RemoveWithoutPathExpansion(layouts_to_remove[i], NULL);
600 } 601 }
601 } 602 }
602 603
603 } // namespace chromeos 604 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698