| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions/external_pref_extension_provider.h" | 5 #include "chrome/browser/extensions/external_pref_extension_provider.h" |
| 6 | 6 |
| 7 #include "app/app_paths.h" | 7 #include "app/app_paths.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/utf_string_conversions.h" |
| 12 #include "base/version.h" | 13 #include "base/version.h" |
| 13 #include "chrome/common/json_value_serializer.h" | 14 #include "chrome/common/json_value_serializer.h" |
| 14 | 15 |
| 15 // Constants for keeping track of extension preferences. | 16 // Constants for keeping track of extension preferences. |
| 16 const wchar_t kLocation[] = L"location"; | 17 const wchar_t kLocation[] = L"location"; |
| 17 const wchar_t kState[] = L"state"; | 18 const wchar_t kState[] = L"state"; |
| 18 const wchar_t kExternalCrx[] = L"external_crx"; | 19 const wchar_t kExternalCrx[] = L"external_crx"; |
| 19 const wchar_t kExternalVersion[] = L"external_version"; | 20 const wchar_t kExternalVersion[] = L"external_version"; |
| 20 | 21 |
| 21 ExternalPrefExtensionProvider::ExternalPrefExtensionProvider() { | 22 ExternalPrefExtensionProvider::ExternalPrefExtensionProvider() { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 << error_msg; | 110 << error_msg; |
| 110 } else { | 111 } else { |
| 111 if (!extensions->IsType(Value::TYPE_DICTIONARY)) { | 112 if (!extensions->IsType(Value::TYPE_DICTIONARY)) { |
| 112 NOTREACHED() << L"Invalid json data"; | 113 NOTREACHED() << L"Invalid json data"; |
| 113 } else { | 114 } else { |
| 114 dictionary.reset(static_cast<DictionaryValue*>(extensions)); | 115 dictionary.reset(static_cast<DictionaryValue*>(extensions)); |
| 115 } | 116 } |
| 116 } | 117 } |
| 117 prefs_.reset(dictionary.release()); | 118 prefs_.reset(dictionary.release()); |
| 118 } | 119 } |
| OLD | NEW |