OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/renderer_host/resource_message_filter.h" | 5 #include "chrome/browser/renderer_host/resource_message_filter.h" |
6 | 6 |
7 #include "app/clipboard/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
8 #include "app/gfx/native_widget_types.h" | 8 #include "app/gfx/native_widget_types.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 it->ExpiryDate().ToDoubleT() * 1000, | 531 it->ExpiryDate().ToDoubleT() * 1000, |
532 it->IsHttpOnly(), | 532 it->IsHttpOnly(), |
533 it->IsSecure(), | 533 it->IsSecure(), |
534 !it->IsPersistent())); | 534 !it->IsPersistent())); |
535 } | 535 } |
536 } | 536 } |
537 | 537 |
538 void ResourceMessageFilter::OnDeleteCookie(const GURL& url, | 538 void ResourceMessageFilter::OnDeleteCookie(const GURL& url, |
539 const std::string& cookie_name) { | 539 const std::string& cookie_name) { |
540 URLRequestContext* context = GetRequestContextForURL(url); | 540 URLRequestContext* context = GetRequestContextForURL(url); |
541 net::CookieMonster* cookie_monster = context->cookie_store()-> | 541 context->cookie_store()->DeleteCookie(url, cookie_name); |
542 GetCookieMonster(); | |
543 if (!cookie_monster) | |
544 return; | |
545 | |
546 cookie_monster->DeleteCookie(url, cookie_name); | |
547 } | 542 } |
548 | 543 |
549 #if defined(OS_WIN) // This hack is Windows-specific. | 544 #if defined(OS_WIN) // This hack is Windows-specific. |
550 void ResourceMessageFilter::OnLoadFont(LOGFONT font) { | 545 void ResourceMessageFilter::OnLoadFont(LOGFONT font) { |
551 // If renderer is running in a sandbox, GetTextMetrics | 546 // If renderer is running in a sandbox, GetTextMetrics |
552 // can sometimes fail. If a font has not been loaded | 547 // can sometimes fail. If a font has not been loaded |
553 // previously, GetTextMetrics will try to load the font | 548 // previously, GetTextMetrics will try to load the font |
554 // from the font file. However, the sandboxed renderer does | 549 // from the font file. However, the sandboxed renderer does |
555 // not have permissions to access any font files and | 550 // not have permissions to access any font files and |
556 // the call fails. So we make the browser pre-load the | 551 // the call fails. So we make the browser pre-load the |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 if (bundle.get()) | 1219 if (bundle.get()) |
1225 dictionary_map = *bundle->dictionary(); | 1220 dictionary_map = *bundle->dictionary(); |
1226 | 1221 |
1227 ViewHostMsg_GetExtensionMessageBundle::WriteReplyParams( | 1222 ViewHostMsg_GetExtensionMessageBundle::WriteReplyParams( |
1228 reply_msg, dictionary_map); | 1223 reply_msg, dictionary_map); |
1229 | 1224 |
1230 ChromeThread::PostTask( | 1225 ChromeThread::PostTask( |
1231 ChromeThread::IO, FROM_HERE, | 1226 ChromeThread::IO, FROM_HERE, |
1232 NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg)); | 1227 NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg)); |
1233 } | 1228 } |
OLD | NEW |