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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/ui/webui/net_internals/net_internals_ui.h" 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // Closes file handle, so, should be called on the WorkerPool thread. 316 // Closes file handle, so, should be called on the WorkerPool thread.
317 void CloseDebugLogFile(PassPlatformFile pass_platform_file) { 317 void CloseDebugLogFile(PassPlatformFile pass_platform_file) {
318 base::ClosePlatformFile(pass_platform_file.ReleaseValue()); 318 base::ClosePlatformFile(pass_platform_file.ReleaseValue());
319 } 319 }
320 320
321 // Closes file handle and deletes debug log file, so, should be called 321 // Closes file handle and deletes debug log file, so, should be called
322 // on the WorkerPool thread. 322 // on the WorkerPool thread.
323 void CloseAndDeleteDebugLogFile(PassPlatformFile pass_platform_file, 323 void CloseAndDeleteDebugLogFile(PassPlatformFile pass_platform_file,
324 const base::FilePath& file_path) { 324 const base::FilePath& file_path) {
325 CloseDebugLogFile(pass_platform_file); 325 CloseDebugLogFile(pass_platform_file);
326 file_util::Delete(file_path, false); 326 base::Delete(file_path, false);
327 } 327 }
328 328
329 // Called upon completion of |WriteDebugLogToFile|. Closes file 329 // Called upon completion of |WriteDebugLogToFile|. Closes file
330 // descriptor, deletes log file in the case of failure and calls 330 // descriptor, deletes log file in the case of failure and calls
331 // |callback|. 331 // |callback|.
332 void WriteDebugLogToFileCompleted(const StoreDebugLogsCallback& callback, 332 void WriteDebugLogToFileCompleted(const StoreDebugLogsCallback& callback,
333 PassPlatformFile pass_platform_file, 333 PassPlatformFile pass_platform_file,
334 const base::FilePath& file_path, 334 const base::FilePath& file_path,
335 bool succeeded) { 335 bool succeeded) {
336 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 336 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 } 1884 }
1885 1885
1886 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1886 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1887 : WebUIController(web_ui) { 1887 : WebUIController(web_ui) {
1888 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1888 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1889 1889
1890 // Set up the chrome://net-internals/ source. 1890 // Set up the chrome://net-internals/ source.
1891 Profile* profile = Profile::FromWebUI(web_ui); 1891 Profile* profile = Profile::FromWebUI(web_ui);
1892 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1892 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1893 } 1893 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/network_profile_bubble.cc ('k') | chrome/browser/value_store/leveldb_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698