| 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 "chromecast/browser/pref_service_helper.h" | 5 #include "chromecast/browser/pref_service_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 base::Bind(&UserPrefsLoadError, &prefs_read_error)); | 70 base::Bind(&UserPrefsLoadError, &prefs_read_error)); |
| 71 | 71 |
| 72 scoped_ptr<PrefService> pref_service(prefServiceFactory.Create(registry)); | 72 scoped_ptr<PrefService> pref_service(prefServiceFactory.Create(registry)); |
| 73 if (prefs_read_error != PersistentPrefStore::PREF_READ_ERROR_NONE) { | 73 if (prefs_read_error != PersistentPrefStore::PREF_READ_ERROR_NONE) { |
| 74 LOG(ERROR) << "Cannot initialize chromecast config: " | 74 LOG(ERROR) << "Cannot initialize chromecast config: " |
| 75 << config_path.value() | 75 << config_path.value() |
| 76 << ", pref_error=" << prefs_read_error; | 76 << ", pref_error=" << prefs_read_error; |
| 77 } | 77 } |
| 78 | 78 |
| 79 OnPrefsLoaded(pref_service.get()); | 79 OnPrefsLoaded(pref_service.get()); |
| 80 return pref_service.Pass(); | 80 return pref_service; |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace shell | 83 } // namespace shell |
| 84 } // namespace chromecast | 84 } // namespace chromecast |
| OLD | NEW |