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

Side by Side Diff: chrome/browser/devtools/devtools_file_helper.cc

Issue 177923007: Move AppendFile and *CurrentDirectory to the 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/devtools/devtools_file_helper.h" 5 #include "chrome/browser/devtools/devtools_file_helper.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 122 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
123 DCHECK(!path.empty()); 123 DCHECK(!path.empty());
124 124
125 base::WriteFile(path, content.c_str(), content.length()); 125 base::WriteFile(path, content.c_str(), content.length());
126 } 126 }
127 127
128 void AppendToFile(const base::FilePath& path, const std::string& content) { 128 void AppendToFile(const base::FilePath& path, const std::string& content) {
129 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 129 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
130 DCHECK(!path.empty()); 130 DCHECK(!path.empty());
131 131
132 file_util::AppendToFile(path, content.c_str(), content.length()); 132 base::AppendToFile(path, content.c_str(), content.length());
133 } 133 }
134 134
135 fileapi::IsolatedContext* isolated_context() { 135 fileapi::IsolatedContext* isolated_context() {
136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
137 fileapi::IsolatedContext* isolated_context = 137 fileapi::IsolatedContext* isolated_context =
138 fileapi::IsolatedContext::GetInstance(); 138 fileapi::IsolatedContext::GetInstance();
139 DCHECK(isolated_context); 139 DCHECK(isolated_context);
140 return isolated_context; 140 return isolated_context;
141 } 141 }
142 142
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 base::DictionaryValue* file_systems_paths_value = update.Get(); 420 base::DictionaryValue* file_systems_paths_value = update.Get();
421 file_systems_paths_value->RemoveWithoutPathExpansion(file_system_path, NULL); 421 file_systems_paths_value->RemoveWithoutPathExpansion(file_system_path, NULL);
422 } 422 }
423 423
424 bool DevToolsFileHelper::IsFileSystemAdded( 424 bool DevToolsFileHelper::IsFileSystemAdded(
425 const std::string& file_system_path) { 425 const std::string& file_system_path) {
426 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 426 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
427 set<std::string> file_system_paths = GetAddedFileSystemPaths(profile_); 427 set<std::string> file_system_paths = GetAddedFileSystemPaths(profile_);
428 return file_system_paths.find(file_system_path) != file_system_paths.end(); 428 return file_system_paths.find(file_system_path) != file_system_paths.end();
429 } 429 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_process_finder_win.cc ('k') | chrome/browser/media_galleries/linux/mtp_read_file_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698