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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/DOMWindowIndexedDatabase.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 20 matching lines...) Expand all
31 #include "modules/indexeddb/IDBFactory.h" 31 #include "modules/indexeddb/IDBFactory.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 DOMWindowIndexedDatabase::DOMWindowIndexedDatabase(LocalDOMWindow& window) 35 DOMWindowIndexedDatabase::DOMWindowIndexedDatabase(LocalDOMWindow& window)
36 : DOMWindowProperty(window.frame()) 36 : DOMWindowProperty(window.frame())
37 , m_window(&window) 37 , m_window(&window)
38 { 38 {
39 } 39 }
40 40
41 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DOMWindowIndexedDatabase);
42
43 DEFINE_TRACE(DOMWindowIndexedDatabase) 41 DEFINE_TRACE(DOMWindowIndexedDatabase)
44 { 42 {
45 visitor->trace(m_window); 43 visitor->trace(m_window);
46 visitor->trace(m_idbFactory); 44 visitor->trace(m_idbFactory);
47 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); 45 HeapSupplement<LocalDOMWindow>::trace(visitor);
48 DOMWindowProperty::trace(visitor); 46 DOMWindowProperty::trace(visitor);
49 } 47 }
50 48
51 const char* DOMWindowIndexedDatabase::supplementName() 49 const char* DOMWindowIndexedDatabase::supplementName()
52 { 50 {
53 return "DOMWindowIndexedDatabase"; 51 return "DOMWindowIndexedDatabase";
54 } 52 }
55 53
56 DOMWindowIndexedDatabase& DOMWindowIndexedDatabase::from(LocalDOMWindow& window) 54 DOMWindowIndexedDatabase& DOMWindowIndexedDatabase::from(LocalDOMWindow& window)
57 { 55 {
58 DOMWindowIndexedDatabase* supplement = static_cast<DOMWindowIndexedDatabase* >(WillBeHeapSupplement<LocalDOMWindow>::from(window, supplementName())); 56 DOMWindowIndexedDatabase* supplement = static_cast<DOMWindowIndexedDatabase* >(HeapSupplement<LocalDOMWindow>::from(window, supplementName()));
59 if (!supplement) { 57 if (!supplement) {
60 supplement = new DOMWindowIndexedDatabase(window); 58 supplement = new DOMWindowIndexedDatabase(window);
61 provideTo(window, supplementName(), adoptPtrWillBeNoop(supplement)); 59 provideTo(window, supplementName(), adoptPtrWillBeNoop(supplement));
62 } 60 }
63 return *supplement; 61 return *supplement;
64 } 62 }
65 63
66 void DOMWindowIndexedDatabase::willDestroyGlobalObjectInFrame() 64 void DOMWindowIndexedDatabase::willDestroyGlobalObjectInFrame()
67 { 65 {
68 m_idbFactory = nullptr; 66 m_idbFactory = nullptr;
(...skipping 23 matching lines...) Expand all
92 90
93 if (!m_window->isCurrentlyDisplayedInFrame()) 91 if (!m_window->isCurrentlyDisplayedInFrame())
94 return nullptr; 92 return nullptr;
95 93
96 if (!m_idbFactory) 94 if (!m_idbFactory)
97 m_idbFactory = IDBFactory::create(IndexedDBClient::create()); 95 m_idbFactory = IDBFactory::create(IndexedDBClient::create());
98 return m_idbFactory.get(); 96 return m_idbFactory.get();
99 } 97 }
100 98
101 } // namespace blink 99 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698