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/webui/chromeos/login/l10n_util.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 MachineStatisticsInitializer::MachineStatisticsInitializer() { | 36 MachineStatisticsInitializer::MachineStatisticsInitializer() { |
37 base::MessageLoop loop; | 37 base::MessageLoop loop; |
38 chromeos::system::StatisticsProvider::GetInstance() | 38 chromeos::system::StatisticsProvider::GetInstance() |
39 ->StartLoadingMachineStatistics(loop.task_runner(), false); | 39 ->StartLoadingMachineStatistics(loop.task_runner(), false); |
40 loop.RunUntilIdle(); | 40 loop.RunUntilIdle(); |
41 } | 41 } |
42 | 42 |
43 // static | 43 // static |
44 MachineStatisticsInitializer* MachineStatisticsInitializer::GetInstance() { | 44 MachineStatisticsInitializer* MachineStatisticsInitializer::GetInstance() { |
45 return Singleton<MachineStatisticsInitializer>::get(); | 45 return base::Singleton<MachineStatisticsInitializer>::get(); |
46 } | 46 } |
47 | 47 |
48 void VerifyOnlyUILanguages(const base::ListValue& list) { | 48 void VerifyOnlyUILanguages(const base::ListValue& list) { |
49 for (size_t i = 0; i < list.GetSize(); ++i) { | 49 for (size_t i = 0; i < list.GetSize(); ++i) { |
50 const base::DictionaryValue* dict; | 50 const base::DictionaryValue* dict; |
51 ASSERT_TRUE(list.GetDictionary(i, &dict)); | 51 ASSERT_TRUE(list.GetDictionary(i, &dict)); |
52 std::string code; | 52 std::string code; |
53 ASSERT_TRUE(dict->GetString("code", &code)); | 53 ASSERT_TRUE(dict->GetString("code", &code)); |
54 EXPECT_NE("is", code) | 54 EXPECT_NE("is", code) |
55 << "Icelandic is an example language which has input method " | 55 << "Icelandic is an example language which has input method " |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 VerifyOnlyUILanguages(*list); | 216 VerifyOnlyUILanguages(*list); |
217 | 217 |
218 ASSERT_LE(3u, list->GetSize()); | 218 ASSERT_LE(3u, list->GetSize()); |
219 | 219 |
220 VerifyLanguageCode(*list, 0, "it"); | 220 VerifyLanguageCode(*list, 0, "it"); |
221 VerifyLanguageCode(*list, 1, "de"); | 221 VerifyLanguageCode(*list, 1, "de"); |
222 VerifyLanguageCode(*list, 2, kMostRelevantLanguagesDivider); | 222 VerifyLanguageCode(*list, 2, kMostRelevantLanguagesDivider); |
223 } | 223 } |
224 | 224 |
225 } // namespace chromeos | 225 } // namespace chromeos |
OLD | NEW |