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/system_logs/chrome_internal_log_source.h" | 5 #include "chrome/browser/chromeos/system_logs/chrome_internal_log_source.h" |
6 | 6 |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/chromeos/settings/cros_settings.h" | 9 #include "chrome/browser/chromeos/settings/cros_settings.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/extension_system.h" | 11 #include "chrome/browser/extensions/extension_system.h" |
12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
13 #include "chrome/browser/sync/about_sync_util.h" | 13 #include "chrome/browser/sync/about_sync_util.h" |
14 #include "chrome/browser/sync/profile_sync_service_factory.h" | 14 #include "chrome/browser/sync/profile_sync_service_factory.h" |
15 #include "chrome/common/chrome_version_info.h" | 15 #include "chrome/common/chrome_version_info.h" |
16 #include "chrome/common/extensions/extension_set.h" | |
17 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
18 #include "extensions/common/extension.h" | 17 #include "extensions/common/extension.h" |
| 18 #include "extensions/common/extension_set.h" |
19 | 19 |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char kSyncDataKey[] = "about_sync_data"; | 23 const char kSyncDataKey[] = "about_sync_data"; |
24 const char kExtensionsListKey[] = "extensions"; | 24 const char kExtensionsListKey[] = "extensions"; |
25 const char kChromeVersionTag[] = "CHROME VERSION"; | 25 const char kChromeVersionTag[] = "CHROME VERSION"; |
26 | 26 |
27 } // namespace | 27 } // namespace |
28 | 28 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 g_browser_process->profile_manager()->GetDefaultProfile(); | 92 g_browser_process->profile_manager()->GetDefaultProfile(); |
93 if (!default_profile) | 93 if (!default_profile) |
94 return; | 94 return; |
95 | 95 |
96 ExtensionService* service = | 96 ExtensionService* service = |
97 extensions::ExtensionSystem::Get(default_profile)->extension_service(); | 97 extensions::ExtensionSystem::Get(default_profile)->extension_service(); |
98 if (!service) | 98 if (!service) |
99 return; | 99 return; |
100 | 100 |
101 std::string extensions_list; | 101 std::string extensions_list; |
102 const ExtensionSet* extensions = service->extensions(); | 102 const extensions::ExtensionSet* extensions = service->extensions(); |
103 for (ExtensionSet::const_iterator it = extensions->begin(); | 103 for (extensions::ExtensionSet::const_iterator it = extensions->begin(); |
104 it != extensions->end(); | 104 it != extensions->end(); |
105 ++it) { | 105 ++it) { |
106 const extensions::Extension* extension = it->get(); | 106 const extensions::Extension* extension = it->get(); |
107 if (extensions_list.empty()) { | 107 if (extensions_list.empty()) { |
108 extensions_list = extension->name(); | 108 extensions_list = extension->name(); |
109 } else { | 109 } else { |
110 extensions_list += ", " + extension->name(); | 110 extensions_list += ", " + extension->name(); |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 if (!extensions_list.empty()) | 114 if (!extensions_list.empty()) |
115 (*response)[kExtensionsListKey] = extensions_list; | 115 (*response)[kExtensionsListKey] = extensions_list; |
116 } | 116 } |
117 | 117 |
118 } // namespace chromeos | 118 } // namespace chromeos |
OLD | NEW |