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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImage.cpp

Issue 2499263002: Add UMA to estimate deroppable memory usage of encoded data size in Resources (Closed)
Patch Set: Use platform/Histgram.h instead of adding depencency from core to base Created 4 years, 1 month 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 19 matching lines...) Expand all
30 #include "core/svg/graphics/SVGImageForContainer.h" 30 #include "core/svg/graphics/SVGImageForContainer.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 StyleFetchedImage::StyleFetchedImage(ImageResource* image, 34 StyleFetchedImage::StyleFetchedImage(ImageResource* image,
35 const Document& document, 35 const Document& document,
36 const KURL& url) 36 const KURL& url)
37 : m_image(image), m_document(&document), m_url(url) { 37 : m_image(image), m_document(&document), m_url(url) {
38 m_isImageResource = true; 38 m_isImageResource = true;
39 m_image->addClient(this); 39 m_image->addClient(this);
40 // ResourceFetcher is not determined from StyleFetchedImage and it is
41 // impossible to send a request for refetching.
42 m_image->setNotRefetchableDataFromDiskCache();
40 ThreadState::current()->registerPreFinalizer(this); 43 ThreadState::current()->registerPreFinalizer(this);
41 } 44 }
42 45
43 StyleFetchedImage::~StyleFetchedImage() {} 46 StyleFetchedImage::~StyleFetchedImage() {}
44 47
45 void StyleFetchedImage::dispose() { 48 void StyleFetchedImage::dispose() {
46 m_image->removeClient(this); 49 m_image->removeClient(this);
47 m_image = nullptr; 50 m_image = nullptr;
48 } 51 }
49 52
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 138 }
136 139
137 DEFINE_TRACE(StyleFetchedImage) { 140 DEFINE_TRACE(StyleFetchedImage) {
138 visitor->trace(m_image); 141 visitor->trace(m_image);
139 visitor->trace(m_document); 142 visitor->trace(m_document);
140 StyleImage::trace(visitor); 143 StyleImage::trace(visitor);
141 ResourceClient::trace(visitor); 144 ResourceClient::trace(visitor);
142 } 145 }
143 146
144 } // namespace blink 147 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('k') | third_party/WebKit/Source/platform/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698