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

Side by Side Diff: third_party/WebKit/Source/web/WebDocument.cpp

Issue 1456843002: Finch experiment: auto-detect text encoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 if (!linkElement) 315 if (!linkElement)
316 return false; 316 return false;
317 return equalIgnoringCase(linkElement->fastGetAttribute(HTMLNames::crossorigi nAttr), "use-credentials"); 317 return equalIgnoringCase(linkElement->fastGetAttribute(HTMLNames::crossorigi nAttr), "use-credentials");
318 } 318 }
319 319
320 WebDistillabilityFeatures WebDocument::distillabilityFeatures() 320 WebDistillabilityFeatures WebDocument::distillabilityFeatures()
321 { 321 {
322 return DocumentStatisticsCollector::collectStatistics(*unwrap<Document>()); 322 return DocumentStatisticsCollector::collectStatistics(*unwrap<Document>());
323 } 323 }
324 324
325 bool WebDocument::attemptedToDetermineEncodingFromContentSniffing() const
326 {
327 const Document* document = constUnwrap<Document>();
328 return document->attemptedToDetermineEncodingFromContentSniffing();
329 }
330
331 bool WebDocument::encodingWasDetectedFromContentSniffing() const
332 {
333 const Document* document = constUnwrap<Document>();
334 return document->encodingWasDetectedFromContentSniffing();
335 }
336
325 WebDocument::WebDocument(const PassRefPtrWillBeRawPtr<Document>& elem) 337 WebDocument::WebDocument(const PassRefPtrWillBeRawPtr<Document>& elem)
326 : WebNode(elem) 338 : WebNode(elem)
327 { 339 {
328 } 340 }
329 341
330 DEFINE_WEB_NODE_TYPE_CASTS(WebDocument, constUnwrap<Node>()->isDocumentNode()); 342 DEFINE_WEB_NODE_TYPE_CASTS(WebDocument, constUnwrap<Node>()->isDocumentNode());
331 343
332 WebDocument& WebDocument::operator=(const PassRefPtrWillBeRawPtr<Document>& elem ) 344 WebDocument& WebDocument::operator=(const PassRefPtrWillBeRawPtr<Document>& elem )
333 { 345 {
334 m_private = elem; 346 m_private = elem;
335 return *this; 347 return *this;
336 } 348 }
337 349
338 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 350 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
339 { 351 {
340 return toDocument(m_private.get()); 352 return toDocument(m_private.get());
341 } 353 }
342 354
343 } // namespace blink 355 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698