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

Side by Side Diff: chrome/browser/chromeos/boot_times_recorder.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 (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/boot_times_recorder.h" 5 #include "chrome/browser/chromeos/boot_times_recorder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 return result; 168 return result;
169 } 169 }
170 170
171 // static 171 // static
172 BootTimesRecorder::Stats BootTimesRecorder::Stats::DeserializeFromString( 172 BootTimesRecorder::Stats BootTimesRecorder::Stats::DeserializeFromString(
173 const std::string& source) { 173 const std::string& source) {
174 if (source.empty()) 174 if (source.empty())
175 return Stats(); 175 return Stats();
176 176
177 scoped_ptr<base::Value> value = base::JSONReader::Read(source); 177 std::unique_ptr<base::Value> value = base::JSONReader::Read(source);
178 base::DictionaryValue* dictionary; 178 base::DictionaryValue* dictionary;
179 if (!value || !value->GetAsDictionary(&dictionary)) { 179 if (!value || !value->GetAsDictionary(&dictionary)) {
180 LOG(ERROR) << "BootTimesRecorder::Stats::DeserializeFromString(): not a " 180 LOG(ERROR) << "BootTimesRecorder::Stats::DeserializeFromString(): not a "
181 "dictionary: '" << source << "'"; 181 "dictionary: '" << source << "'";
182 return Stats(); 182 return Stats();
183 } 183 }
184 184
185 Stats result; 185 Stats result;
186 if (!dictionary->GetString(kUptime, &result.uptime_) || 186 if (!dictionary->GetString(kUptime, &result.uptime_) ||
187 !dictionary->GetString(kDisk, &result.disk_)) { 187 !dictionary->GetString(kDisk, &result.disk_)) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 GetRenderWidgetHost(&web_contents->GetController()); 524 GetRenderWidgetHost(&web_contents->GetController());
525 render_widget_hosts_loading_.erase(render_widget_host); 525 render_widget_hosts_loading_.erase(render_widget_host);
526 break; 526 break;
527 } 527 }
528 default: 528 default:
529 break; 529 break;
530 } 530 }
531 } 531 }
532 532
533 } // namespace chromeos 533 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/base/locale_util.cc ('k') | chrome/browser/chromeos/certificate_provider/certificate_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698