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

Side by Side Diff: Source/core/platform/KURLGoogle.cpp

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 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 | « Source/core/platform/KURL.cpp ('k') | Source/core/platform/KURLGooglePrivate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 21 matching lines...) Expand all
32 #include "config.h" 32 #include "config.h"
33 #include "KURL.h" 33 #include "KURL.h"
34 34
35 #ifndef NDEBUG 35 #ifndef NDEBUG
36 #include <stdio.h> 36 #include <stdio.h>
37 #endif 37 #endif
38 38
39 #include <algorithm> 39 #include <algorithm>
40 40
41 #include "NotImplemented.h" 41 #include "NotImplemented.h"
42 #include "PlatformMemoryInstrumentation.h"
43 #include "TextEncoding.h" 42 #include "TextEncoding.h"
44 #include <wtf/HashMap.h> 43 #include <wtf/HashMap.h>
45 #include <wtf/MemoryInstrumentationString.h>
46 #include <wtf/Vector.h> 44 #include <wtf/Vector.h>
47 #include <wtf/StdLibExtras.h> 45 #include <wtf/StdLibExtras.h>
48 #include <wtf/text/CString.h> 46 #include <wtf/text/CString.h>
49 #include <wtf/text/StringHash.h> 47 #include <wtf/text/StringHash.h>
50 48
51 #include <googleurl/src/url_util.h> 49 #include <googleurl/src/url_util.h>
52 50
53 using WTF::isASCIILower; 51 using WTF::isASCIILower;
54 using WTF::toASCIILower; 52 using WTF::toASCIILower;
55 using std::binary_search; 53 using std::binary_search;
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 m_string = String(); 380 m_string = String();
383 else if (m_utf8IsASCII) 381 else if (m_utf8IsASCII)
384 m_string = String(m_utf8.data(), m_utf8.length()); 382 m_string = String(m_utf8.data(), m_utf8.length());
385 else 383 else
386 m_string = String::fromUTF8(m_utf8.data(), m_utf8.length()); 384 m_string = String::fromUTF8(m_utf8.data(), m_utf8.length());
387 m_stringIsValid = true; 385 m_stringIsValid = true;
388 } 386 }
389 return m_string; 387 return m_string;
390 } 388 }
391 389
392 void KURLGooglePrivate::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) co nst
393 {
394 MemoryClassInfo info(memoryObjectInfo, this);
395 info.addMember(m_utf8, "utf8");
396 info.addMember(m_string, "string");
397 info.addMember(m_innerURL, "innerURL");
398 info.addMember(m_parsed, "parsed");
399 }
400
401 bool KURLGooglePrivate::isSafeToSendToAnotherThread() const 390 bool KURLGooglePrivate::isSafeToSendToAnotherThread() const
402 { 391 {
403 return m_string.isSafeToSendToAnotherThread() 392 return m_string.isSafeToSendToAnotherThread()
404 && m_utf8.isSafeToSendToAnotherThread() 393 && m_utf8.isSafeToSendToAnotherThread()
405 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); 394 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread());
406 } 395 }
407 396
408 // KURL ------------------------------------------------------------------------ 397 // KURL ------------------------------------------------------------------------
409 398
410 // Initializes with a string representing an absolute URL. No encoding 399 // Initializes with a string representing an absolute URL. No encoding
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 if (a.string()[hostStartA + i] != b.string()[hostStartB + i]) 961 if (a.string()[hostStartA + i] != b.string()[hostStartB + i])
973 return false; 962 return false;
974 963
975 if (a.port() != b.port()) 964 if (a.port() != b.port())
976 return false; 965 return false;
977 966
978 return true; 967 return true;
979 } 968 }
980 969
981 } // namespace WebCore 970 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/KURL.cpp ('k') | Source/core/platform/KURLGooglePrivate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698