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

Side by Side Diff: content/shell/browser/shell_message_filter.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_message_filter.h" 5 #include "content/shell/browser/shell_message_filter.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "content/public/browser/child_process_security_policy.h" 9 #include "content/public/browser/child_process_security_policy.h"
10 #include "content/shell/browser/shell_browser_context.h" 10 #include "content/shell/browser/shell_browser_context.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DeleteAllCookies, OnDeleteAllCookies) 54 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DeleteAllCookies, OnDeleteAllCookies)
55 IPC_MESSAGE_UNHANDLED(handled = false) 55 IPC_MESSAGE_UNHANDLED(handled = false)
56 IPC_END_MESSAGE_MAP() 56 IPC_END_MESSAGE_MAP()
57 57
58 return handled; 58 return handled;
59 } 59 }
60 60
61 void ShellMessageFilter::OnReadFileToString(const base::FilePath& local_file, 61 void ShellMessageFilter::OnReadFileToString(const base::FilePath& local_file,
62 std::string* contents) { 62 std::string* contents) {
63 base::ThreadRestrictions::ScopedAllowIO allow_io; 63 base::ThreadRestrictions::ScopedAllowIO allow_io;
64 file_util::ReadFileToString(local_file, contents); 64 base::ReadFileToString(local_file, contents);
65 } 65 }
66 66
67 void ShellMessageFilter::OnRegisterIsolatedFileSystem( 67 void ShellMessageFilter::OnRegisterIsolatedFileSystem(
68 const std::vector<base::FilePath>& absolute_filenames, 68 const std::vector<base::FilePath>& absolute_filenames,
69 std::string* filesystem_id) { 69 std::string* filesystem_id) {
70 fileapi::IsolatedContext::FileInfoSet files; 70 fileapi::IsolatedContext::FileInfoSet files;
71 ChildProcessSecurityPolicy* policy = 71 ChildProcessSecurityPolicy* policy =
72 ChildProcessSecurityPolicy::GetInstance(); 72 ChildProcessSecurityPolicy::GetInstance();
73 for (size_t i = 0; i < absolute_filenames.size(); ++i) { 73 for (size_t i = 0; i < absolute_filenames.size(); ++i) {
74 files.AddPath(absolute_filenames[i], NULL); 74 files.AddPath(absolute_filenames[i], NULL);
(...skipping 21 matching lines...) Expand all
96 ShellNetworkDelegate::SetAcceptAllCookies(accept); 96 ShellNetworkDelegate::SetAcceptAllCookies(accept);
97 } 97 }
98 98
99 void ShellMessageFilter::OnDeleteAllCookies() { 99 void ShellMessageFilter::OnDeleteAllCookies() {
100 request_context_getter_->GetURLRequestContext()->cookie_store() 100 request_context_getter_->GetURLRequestContext()->cookie_store()
101 ->GetCookieMonster() 101 ->GetCookieMonster()
102 ->DeleteAllAsync(net::CookieMonster::DeleteCallback()); 102 ->DeleteAllAsync(net::CookieMonster::DeleteCallback());
103 } 103 }
104 104
105 } // namespace content 105 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/app/webkit_test_platform_support_win.cc ('k') | content/test/image_decoder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698