OLD | NEW |
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/mobile_config.h" | 5 #include "chrome/browser/chromeos/mobile_config.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 void MobileConfig::LocaleConfig::InitFromDictionary( | 207 void MobileConfig::LocaleConfig::InitFromDictionary( |
208 base::DictionaryValue* locale_dict) { | 208 base::DictionaryValue* locale_dict) { |
209 locale_dict->GetString(kSetupURLAttr, &setup_url_); | 209 locale_dict->GetString(kSetupURLAttr, &setup_url_); |
210 } | 210 } |
211 | 211 |
212 // MobileConfig implementation, public ----------------------------------------- | 212 // MobileConfig implementation, public ----------------------------------------- |
213 | 213 |
214 // static | 214 // static |
215 MobileConfig* MobileConfig::GetInstance() { | 215 MobileConfig* MobileConfig::GetInstance() { |
216 return Singleton<MobileConfig, | 216 return base::Singleton<MobileConfig, |
217 DefaultSingletonTraits<MobileConfig> >::get(); | 217 base::DefaultSingletonTraits<MobileConfig>>::get(); |
218 } | 218 } |
219 | 219 |
220 const MobileConfig::Carrier* MobileConfig::GetCarrier( | 220 const MobileConfig::Carrier* MobileConfig::GetCarrier( |
221 const std::string& carrier_id) const { | 221 const std::string& carrier_id) const { |
222 CarrierIdMap::const_iterator id_iter = carrier_id_map_.find(carrier_id); | 222 CarrierIdMap::const_iterator id_iter = carrier_id_map_.find(carrier_id); |
223 std::string internal_id; | 223 std::string internal_id; |
224 if (id_iter != carrier_id_map_.end()) | 224 if (id_iter != carrier_id_map_.end()) |
225 internal_id = id_iter->second; | 225 internal_id = id_iter->second; |
226 else | 226 else |
227 return NULL; | 227 return NULL; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 << local_config_file.value(); | 367 << local_config_file.value(); |
368 } | 368 } |
369 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 369 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
370 base::Bind(&MobileConfig::ProcessConfig, | 370 base::Bind(&MobileConfig::ProcessConfig, |
371 base::Unretained(this), // singleton. | 371 base::Unretained(this), // singleton. |
372 global_config, | 372 global_config, |
373 local_config)); | 373 local_config)); |
374 } | 374 } |
375 | 375 |
376 } // namespace chromeos | 376 } // namespace chromeos |
OLD | NEW |