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

Side by Side Diff: Source/core/loader/FrameLoader.cpp

Issue 102103002: Have HashMap<KeyType, AtomicString>::get() return a const reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 m_frame->document()->initContentSecurityPolicy(m_documentLoader ? ContentSec urityPolicyResponseHeaders(m_documentLoader->response()) : ContentSecurityPolicy ResponseHeaders()); 349 m_frame->document()->initContentSecurityPolicy(m_documentLoader ? ContentSec urityPolicyResponseHeaders(m_documentLoader->response()) : ContentSecurityPolicy ResponseHeaders());
350 350
351 Settings* settings = m_frame->document()->settings(); 351 Settings* settings = m_frame->document()->settings();
352 if (settings) { 352 if (settings) {
353 m_frame->document()->fetcher()->setImagesEnabled(settings->areImagesEnab led()); 353 m_frame->document()->fetcher()->setImagesEnabled(settings->areImagesEnab led());
354 m_frame->document()->fetcher()->setAutoLoadImages(settings->loadsImagesA utomatically()); 354 m_frame->document()->fetcher()->setAutoLoadImages(settings->loadsImagesA utomatically());
355 } 355 }
356 356
357 if (m_documentLoader) { 357 if (m_documentLoader) {
358 String dnsPrefetchControl = m_documentLoader->response().httpHeaderField ("X-DNS-Prefetch-Control"); 358 const AtomicString& dnsPrefetchControl = m_documentLoader->response().ht tpHeaderField("X-DNS-Prefetch-Control");
359 if (!dnsPrefetchControl.isEmpty()) 359 if (!dnsPrefetchControl.isEmpty())
360 m_frame->document()->parseDNSPrefetchControlHeader(dnsPrefetchContro l); 360 m_frame->document()->parseDNSPrefetchControlHeader(dnsPrefetchContro l);
361 361
362 String headerContentLanguage = m_documentLoader->response().httpHeaderFi eld("Content-Language"); 362 String headerContentLanguage = m_documentLoader->response().httpHeaderFi eld("Content-Language");
363 if (!headerContentLanguage.isEmpty()) { 363 if (!headerContentLanguage.isEmpty()) {
364 size_t commaIndex = headerContentLanguage.find(','); 364 size_t commaIndex = headerContentLanguage.find(',');
365 headerContentLanguage.truncate(commaIndex); // kNotFound == -1 == do n't truncate 365 headerContentLanguage.truncate(commaIndex); // kNotFound == -1 == do n't truncate
366 headerContentLanguage = headerContentLanguage.stripWhiteSpace(isHTML Space<UChar>); 366 headerContentLanguage = headerContentLanguage.stripWhiteSpace(isHTML Space<UChar>);
367 if (!headerContentLanguage.isEmpty()) 367 if (!headerContentLanguage.isEmpty())
368 m_frame->document()->setContentLanguage(headerContentLanguage); 368 m_frame->document()->setContentLanguage(headerContentLanguage);
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 { 1535 {
1536 SandboxFlags flags = m_forcedSandboxFlags; 1536 SandboxFlags flags = m_forcedSandboxFlags;
1537 if (Frame* parentFrame = m_frame->tree().parent()) 1537 if (Frame* parentFrame = m_frame->tree().parent())
1538 flags |= parentFrame->document()->sandboxFlags(); 1538 flags |= parentFrame->document()->sandboxFlags();
1539 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) 1539 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement())
1540 flags |= ownerElement->sandboxFlags(); 1540 flags |= ownerElement->sandboxFlags();
1541 return flags; 1541 return flags;
1542 } 1542 }
1543 1543
1544 } // namespace WebCore 1544 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698