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

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

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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_loader.h" 5 #include "chrome/browser/chromeos/boot_times_loader.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 output += 202 output +=
203 base::StringPrintf( 203 base::StringPrintf(
204 "\n%.2f +%.4f %s", 204 "\n%.2f +%.4f %s",
205 since_first.InSecondsF(), 205 since_first.InSecondsF(),
206 since_prev.InSecondsF(), 206 since_prev.InSecondsF(),
207 name.data()); 207 name.data());
208 prev = tm.time(); 208 prev = tm.time();
209 } 209 }
210 output += '\n'; 210 output += '\n';
211 211
212 file_util::WriteFile( 212 base::WriteFile(log_path.Append(base_name), output.data(), output.size());
213 log_path.Append(base_name), output.data(), output.size());
214 } 213 }
215 214
216 void BootTimesLoader::LoginDone() { 215 void BootTimesLoader::LoginDone() {
217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
218 AddLoginTimeMarker("LoginDone", false); 217 AddLoginTimeMarker("LoginDone", false);
219 RecordCurrentStats(kChromeFirstRender); 218 RecordCurrentStats(kChromeFirstRender);
220 registrar_.Remove(this, content::NOTIFICATION_LOAD_START, 219 registrar_.Remove(this, content::NOTIFICATION_LOAD_START,
221 content::NotificationService::AllSources()); 220 content::NotificationService::AllSources());
222 registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP, 221 registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
223 content::NotificationService::AllSources()); 222 content::NotificationService::AllSources());
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 GetRenderWidgetHost(&web_contents->GetController()); 377 GetRenderWidgetHost(&web_contents->GetController());
379 render_widget_hosts_loading_.erase(render_widget_host); 378 render_widget_hosts_loading_.erase(render_widget_host);
380 break; 379 break;
381 } 380 }
382 default: 381 default:
383 break; 382 break;
384 } 383 }
385 } 384 }
386 385
387 } // namespace chromeos 386 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698