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

Side by Side Diff: chrome/browser/devtools/devtools_file_helper.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/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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 CanceledCallback canceled_callback_; 115 CanceledCallback canceled_callback_;
116 WebContents* web_contents_; 116 WebContents* web_contents_;
117 117
118 DISALLOW_COPY_AND_ASSIGN(SelectFileDialog); 118 DISALLOW_COPY_AND_ASSIGN(SelectFileDialog);
119 }; 119 };
120 120
121 void WriteToFile(const base::FilePath& path, const std::string& content) { 121 void WriteToFile(const base::FilePath& path, const std::string& content) {
122 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 122 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
123 DCHECK(!path.empty()); 123 DCHECK(!path.empty());
124 124
125 file_util::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 file_util::AppendToFile(path, content.c_str(), content.length());
133 } 133 }
134 134
135 fileapi::IsolatedContext* isolated_context() { 135 fileapi::IsolatedContext* isolated_context() {
(...skipping 284 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

Powered by Google App Engine
This is Rietveld 408576698