| 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 "components/sync_driver/about_sync_util.h" | 5 #include "components/sync_driver/about_sync_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 return message; | 236 return message; |
| 237 } | 237 } |
| 238 | 238 |
| 239 } // namespace | 239 } // namespace |
| 240 | 240 |
| 241 // This function both defines the structure of the message to be returned and | 241 // This function both defines the structure of the message to be returned and |
| 242 // its contents. Most of the message consists of simple fields in about:sync | 242 // its contents. Most of the message consists of simple fields in about:sync |
| 243 // which are grouped into sections and populated with the help of the SyncStat | 243 // which are grouped into sections and populated with the help of the SyncStat |
| 244 // classes defined above. | 244 // classes defined above. |
| 245 scoped_ptr<base::DictionaryValue> ConstructAboutInformation( | 245 std::unique_ptr<base::DictionaryValue> ConstructAboutInformation( |
| 246 sync_driver::SyncService* service, | 246 sync_driver::SyncService* service, |
| 247 SigninManagerBase* signin, | 247 SigninManagerBase* signin, |
| 248 version_info::Channel channel) { | 248 version_info::Channel channel) { |
| 249 scoped_ptr<base::DictionaryValue> about_info(new base::DictionaryValue()); | 249 std::unique_ptr<base::DictionaryValue> about_info( |
| 250 new base::DictionaryValue()); |
| 250 | 251 |
| 251 // 'details': A list of sections. | 252 // 'details': A list of sections. |
| 252 base::ListValue* stats_list = new base::ListValue(); | 253 base::ListValue* stats_list = new base::ListValue(); |
| 253 | 254 |
| 254 // The following lines define the sections and their fields. For each field, | 255 // The following lines define the sections and their fields. For each field, |
| 255 // a class is instantiated, which allows us to reference the fields in | 256 // a class is instantiated, which allows us to reference the fields in |
| 256 // 'setter' code later on in this function. | 257 // 'setter' code later on in this function. |
| 257 base::ListValue* section_summary = AddSection(stats_list, "Summary"); | 258 base::ListValue* section_summary = AddSection(stats_list, "Summary"); |
| 258 StringSyncStat summary_string(section_summary, "Summary"); | 259 StringSyncStat summary_string(section_summary, "Summary"); |
| 259 | 260 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } | 525 } |
| 525 | 526 |
| 526 about_info->Set("type_status", service->GetTypeStatusMap()); | 527 about_info->Set("type_status", service->GetTypeStatusMap()); |
| 527 | 528 |
| 528 return about_info; | 529 return about_info; |
| 529 } | 530 } |
| 530 | 531 |
| 531 } // namespace sync_ui_util | 532 } // namespace sync_ui_util |
| 532 | 533 |
| 533 } // namespace sync_driver | 534 } // namespace sync_driver |
| OLD | NEW |