OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/feedback/system_logs/log_sources/chrome_internal_log_so
urce.h" | 5 #include "chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_so
urce.h" |
6 | 6 |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
9 #include "base/task_scheduler/post_task.h" | 9 #include "base/task_scheduler/post_task.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 service, service->signin(), chrome::GetChannel())); | 165 service, service->signin(), chrome::GetChannel())); |
166 | 166 |
167 // Remove identity section. | 167 // Remove identity section. |
168 base::ListValue* details = NULL; | 168 base::ListValue* details = NULL; |
169 sync_logs->GetList(syncer::sync_ui_util::kDetailsKey, &details); | 169 sync_logs->GetList(syncer::sync_ui_util::kDetailsKey, &details); |
170 if (!details) | 170 if (!details) |
171 return; | 171 return; |
172 for (base::ListValue::iterator it = details->begin(); | 172 for (base::ListValue::iterator it = details->begin(); |
173 it != details->end(); ++it) { | 173 it != details->end(); ++it) { |
174 base::DictionaryValue* dict = NULL; | 174 base::DictionaryValue* dict = NULL; |
175 if ((*it)->GetAsDictionary(&dict)) { | 175 if (it->GetAsDictionary(&dict)) { |
176 std::string title; | 176 std::string title; |
177 dict->GetString("title", &title); | 177 dict->GetString("title", &title); |
178 if (title == syncer::sync_ui_util::kIdentityTitle) { | 178 if (title == syncer::sync_ui_util::kIdentityTitle) { |
179 details->Erase(it, NULL); | 179 details->Erase(it, NULL); |
180 break; | 180 break; |
181 } | 181 } |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 // Add sync logs to logs. | 185 // Add sync logs to logs. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 void ChromeInternalLogSource::PopulateInstallerBrandCode( | 283 void ChromeInternalLogSource::PopulateInstallerBrandCode( |
284 SystemLogsResponse* response) { | 284 SystemLogsResponse* response) { |
285 std::string brand; | 285 std::string brand; |
286 google_brand::GetBrand(&brand); | 286 google_brand::GetBrand(&brand); |
287 (*response)[kInstallerBrandCode] = | 287 (*response)[kInstallerBrandCode] = |
288 brand.empty() ? "Unknown brand code" : brand; | 288 brand.empty() ? "Unknown brand code" : brand; |
289 } | 289 } |
290 #endif | 290 #endif |
291 | 291 |
292 } // namespace system_logs | 292 } // namespace system_logs |
OLD | NEW |