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

Side by Side Diff: content/worker/worker_webkitplatformsupport_impl.cc

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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
« no previous file with comments | « content/test/webrtc_audio_device_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/worker/worker_webkitplatformsupport_impl.h" 5 #include "content/worker/worker_webkitplatformsupport_impl.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 const WebString&) { 257 const WebString&) {
258 NOTREACHED(); 258 NOTREACHED();
259 return WebMimeRegistry::IsSupported; 259 return WebMimeRegistry::IsSupported;
260 } 260 }
261 261
262 WebString WorkerWebKitPlatformSupportImpl::mimeTypeForExtension( 262 WebString WorkerWebKitPlatformSupportImpl::mimeTypeForExtension(
263 const WebString& file_extension) { 263 const WebString& file_extension) {
264 std::string mime_type; 264 std::string mime_type;
265 thread_safe_sender_->Send(new MimeRegistryMsg_GetMimeTypeFromExtension( 265 thread_safe_sender_->Send(new MimeRegistryMsg_GetMimeTypeFromExtension(
266 base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type)); 266 base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type));
267 return ASCIIToUTF16(mime_type); 267 return base::ASCIIToUTF16(mime_type);
268 } 268 }
269 269
270 WebString WorkerWebKitPlatformSupportImpl::wellKnownMimeTypeForExtension( 270 WebString WorkerWebKitPlatformSupportImpl::wellKnownMimeTypeForExtension(
271 const WebString& file_extension) { 271 const WebString& file_extension) {
272 std::string mime_type; 272 std::string mime_type;
273 net::GetWellKnownMimeTypeFromExtension( 273 net::GetWellKnownMimeTypeFromExtension(
274 base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type); 274 base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type);
275 return ASCIIToUTF16(mime_type); 275 return base::ASCIIToUTF16(mime_type);
276 } 276 }
277 277
278 WebString WorkerWebKitPlatformSupportImpl::mimeTypeFromFile( 278 WebString WorkerWebKitPlatformSupportImpl::mimeTypeFromFile(
279 const WebString& file_path) { 279 const WebString& file_path) {
280 std::string mime_type; 280 std::string mime_type;
281 thread_safe_sender_->Send( 281 thread_safe_sender_->Send(
282 new MimeRegistryMsg_GetMimeTypeFromFile( 282 new MimeRegistryMsg_GetMimeTypeFromFile(
283 base::FilePath::FromUTF16Unsafe(file_path), 283 base::FilePath::FromUTF16Unsafe(file_path),
284 &mime_type)); 284 &mime_type));
285 return ASCIIToUTF16(mime_type); 285 return base::ASCIIToUTF16(mime_type);
286 } 286 }
287 287
288 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { 288 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() {
289 return blob_registry_.get(); 289 return blob_registry_.get();
290 } 290 }
291 291
292 void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 292 void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
293 const blink::WebURL& storage_partition, 293 const blink::WebURL& storage_partition,
294 blink::WebStorageQuotaType type, 294 blink::WebStorageQuotaType type,
295 blink::WebStorageQuotaCallbacks* callbacks) { 295 blink::WebStorageQuotaCallbacks* callbacks) {
296 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) 296 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
297 return; 297 return;
298 QuotaDispatcher::ThreadSpecificInstance( 298 QuotaDispatcher::ThreadSpecificInstance(
299 thread_safe_sender_.get(), 299 thread_safe_sender_.get(),
300 quota_message_filter_.get())->QueryStorageUsageAndQuota( 300 quota_message_filter_.get())->QueryStorageUsageAndQuota(
301 storage_partition, 301 storage_partition,
302 static_cast<quota::StorageType>(type), 302 static_cast<quota::StorageType>(type),
303 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 303 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
304 } 304 }
305 305
306 } // namespace content 306 } // namespace content
OLDNEW
« no previous file with comments | « content/test/webrtc_audio_device_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698