Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "base/task_scheduler/post_task.h" 10 #include "base/task_scheduler/post_task.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 service, service->signin(), chrome::GetChannel())); 166 service, service->signin(), chrome::GetChannel()));
167 167
168 // Remove identity section. 168 // Remove identity section.
169 base::ListValue* details = NULL; 169 base::ListValue* details = NULL;
170 sync_logs->GetList(syncer::sync_ui_util::kDetailsKey, &details); 170 sync_logs->GetList(syncer::sync_ui_util::kDetailsKey, &details);
171 if (!details) 171 if (!details)
172 return; 172 return;
173 for (base::ListValue::iterator it = details->begin(); 173 for (base::ListValue::iterator it = details->begin();
174 it != details->end(); ++it) { 174 it != details->end(); ++it) {
175 base::DictionaryValue* dict = NULL; 175 base::DictionaryValue* dict = NULL;
176 if (it->GetAsDictionary(&dict)) { 176 if ((*it)->GetAsDictionary(&dict)) {
177 std::string title; 177 std::string title;
178 dict->GetString("title", &title); 178 dict->GetString("title", &title);
179 if (title == syncer::sync_ui_util::kIdentityTitle) { 179 if (title == syncer::sync_ui_util::kIdentityTitle) {
180 details->Erase(it, NULL); 180 details->Erase(it, NULL);
181 break; 181 break;
182 } 182 }
183 } 183 }
184 } 184 }
185 185
186 // Add sync logs to logs. 186 // Add sync logs to logs.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 void ChromeInternalLogSource::PopulateInstallerBrandCode( 288 void ChromeInternalLogSource::PopulateInstallerBrandCode(
289 SystemLogsResponse* response) { 289 SystemLogsResponse* response) {
290 std::string brand; 290 std::string brand;
291 google_brand::GetBrand(&brand); 291 google_brand::GetBrand(&brand);
292 (*response)[kInstallerBrandCode] = 292 (*response)[kInstallerBrandCode] =
293 brand.empty() ? "Unknown brand code" : brand; 293 brand.empty() ? "Unknown brand code" : brand;
294 } 294 }
295 #endif 295 #endif
296 296
297 } // namespace system_logs 297 } // namespace system_logs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698