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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc

Issue 131043002: [Pepper] Use platform path for QuotaReservation::GetOpenFileHandle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: suppress DCHECK failure Created 6 years, 11 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/browser/renderer_host/pepper/pepper_file_system_browser_host.h " 5 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h "
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/browser/renderer_host/pepper/pepper_file_io_host.h" 9 #include "content/browser/renderer_host/pepper/pepper_file_io_host.h"
10 #include "content/browser/renderer_host/pepper/quota_reservation.h" 10 #include "content/browser/renderer_host/pepper/quota_reservation.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 IPC_END_MESSAGE_MAP() 114 IPC_END_MESSAGE_MAP()
115 return PP_ERROR_FAILED; 115 return PP_ERROR_FAILED;
116 } 116 }
117 117
118 bool PepperFileSystemBrowserHost::IsFileSystemHost() { 118 bool PepperFileSystemBrowserHost::IsFileSystemHost() {
119 return true; 119 return true;
120 } 120 }
121 121
122 void PepperFileSystemBrowserHost::OpenQuotaFile( 122 void PepperFileSystemBrowserHost::OpenQuotaFile(
123 PepperFileIOHost* file_io_host, 123 PepperFileIOHost* file_io_host,
124 const base::FilePath& file_path, 124 const fileapi::FileSystemURL& url,
125 const OpenQuotaFileCallback& callback) { 125 const OpenQuotaFileCallback& callback) {
126 int32_t id = file_io_host->pp_resource(); 126 int32_t id = file_io_host->pp_resource();
127 std::pair<FileMap::iterator, bool> insert_result = 127 std::pair<FileMap::iterator, bool> insert_result =
128 files_.insert(std::make_pair(id, file_io_host)); 128 files_.insert(std::make_pair(id, file_io_host));
129 if (insert_result.second) { 129 if (insert_result.second) {
130 base::PostTaskAndReplyWithResult( 130 base::PostTaskAndReplyWithResult(
131 file_system_context_->default_file_task_runner(), 131 file_system_context_->default_file_task_runner(),
132 FROM_HERE, 132 FROM_HERE,
133 base::Bind(&QuotaReservation::OpenFile, 133 base::Bind(&QuotaReservation::OpenFile,
134 quota_reservation_, 134 quota_reservation_,
135 id, 135 id,
136 file_path), 136 url),
137 callback); 137 callback);
138 } else { 138 } else {
139 NOTREACHED(); 139 NOTREACHED();
140 } 140 }
141 } 141 }
142 142
143 void PepperFileSystemBrowserHost::CloseQuotaFile( 143 void PepperFileSystemBrowserHost::CloseQuotaFile(
144 PepperFileIOHost* file_io_host, 144 PepperFileIOHost* file_io_host,
145 int64_t max_written_offset) { 145 int64_t max_written_offset) {
146 int32_t id = file_io_host->pp_resource(); 146 int32_t id = file_io_host->pp_resource();
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 if (!IsAsciiAlpha(*it) && !IsAsciiDigit(*it) && 499 if (!IsAsciiAlpha(*it) && !IsAsciiDigit(*it) &&
500 *it != '.' && *it != '_' && *it != '-') { 500 *it != '.' && *it != '_' && *it != '-') {
501 LOG(WARNING) << "Failed to generate a plugin id."; 501 LOG(WARNING) << "Failed to generate a plugin id.";
502 return std::string(); 502 return std::string();
503 } 503 }
504 } 504 }
505 return output; 505 return output;
506 } 506 }
507 507
508 } // namespace content 508 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698