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

Side by Side Diff: Source/core/testing/InternalSettings.cpp

Issue 1232333002: Fix virtual/override/final usage in the rest of Source/core/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/testing/InternalSettings.h ('k') | Source/core/testing/Internals.cpp » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #else 110 #else
111 // We can't use RefCountedSupplement because that would try to make InternalSett ings RefCounted 111 // We can't use RefCountedSupplement because that would try to make InternalSett ings RefCounted
112 // and InternalSettings is already RefCounted via its base class, InternalSettin gsGenerated. 112 // and InternalSettings is already RefCounted via its base class, InternalSettin gsGenerated.
113 // Instead, we manually make InternalSettings supplement Page. 113 // Instead, we manually make InternalSettings supplement Page.
114 class InternalSettingsWrapper : public Supplement<Page> { 114 class InternalSettingsWrapper : public Supplement<Page> {
115 public: 115 public:
116 explicit InternalSettingsWrapper(Page& page) 116 explicit InternalSettingsWrapper(Page& page)
117 : m_internalSettings(InternalSettings::create(page)) { } 117 : m_internalSettings(InternalSettings::create(page)) { }
118 virtual ~InternalSettingsWrapper() { m_internalSettings->hostDestroyed(); } 118 virtual ~InternalSettingsWrapper() { m_internalSettings->hostDestroyed(); }
119 #if ENABLE(ASSERT) 119 #if ENABLE(ASSERT)
120 virtual bool isRefCountedWrapper() const override { return true; } 120 bool isRefCountedWrapper() const override { return true; }
121 #endif 121 #endif
122 InternalSettings* internalSettings() const { return m_internalSettings.get() ; } 122 InternalSettings* internalSettings() const { return m_internalSettings.get() ; }
123 123
124 private: 124 private:
125 RefPtr<InternalSettings> m_internalSettings; 125 RefPtr<InternalSettings> m_internalSettings;
126 }; 126 };
127 127
128 InternalSettings* InternalSettings::from(Page& page) 128 InternalSettings* InternalSettings::from(Page& page)
129 { 129 {
130 if (!Supplement<Page>::from(page, supplementName())) 130 if (!Supplement<Page>::from(page, supplementName()))
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 settings()->setLogDnsPrefetchAndPreconnect(enabled); 498 settings()->setLogDnsPrefetchAndPreconnect(enabled);
499 } 499 }
500 500
501 void InternalSettings::setPreloadLogging(bool enabled, ExceptionState& exception State) 501 void InternalSettings::setPreloadLogging(bool enabled, ExceptionState& exception State)
502 { 502 {
503 InternalSettingsGuardForSettings(); 503 InternalSettingsGuardForSettings();
504 settings()->setLogPreload(enabled); 504 settings()->setLogPreload(enabled);
505 } 505 }
506 506
507 } 507 }
OLDNEW
« no previous file with comments | « Source/core/testing/InternalSettings.h ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698