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

Side by Side Diff: Source/modules/crypto/CryptoResultImpl.cpp

Issue 1227783004: Fix virtual/override/final usage in Source/modules/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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/modules/crypto/CryptoResultImpl.h ('k') | Source/modules/crypto/KeyAlgorithm.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 class CryptoResultImpl::Resolver final : public ScriptPromiseResolver { 64 class CryptoResultImpl::Resolver final : public ScriptPromiseResolver {
65 public: 65 public:
66 static PassRefPtrWillBeRawPtr<ScriptPromiseResolver> create(ScriptState* scr iptState, CryptoResultImpl* result) 66 static PassRefPtrWillBeRawPtr<ScriptPromiseResolver> create(ScriptState* scr iptState, CryptoResultImpl* result)
67 { 67 {
68 RefPtrWillBeRawPtr<Resolver> resolver = adoptRefWillBeNoop(new Resolver( scriptState, result)); 68 RefPtrWillBeRawPtr<Resolver> resolver = adoptRefWillBeNoop(new Resolver( scriptState, result));
69 resolver->suspendIfNeeded(); 69 resolver->suspendIfNeeded();
70 resolver->keepAliveWhilePending(); 70 resolver->keepAliveWhilePending();
71 return resolver.release(); 71 return resolver.release();
72 } 72 }
73 73
74 virtual void stop() override 74 void stop() override
75 { 75 {
76 m_result->cancel(); 76 m_result->cancel();
77 m_result->clearResolver(); 77 m_result->clearResolver();
78 m_result = nullptr; 78 m_result = nullptr;
79 ScriptPromiseResolver::stop(); 79 ScriptPromiseResolver::stop();
80 } 80 }
81 81
82 private: 82 private:
83 Resolver(ScriptState* scriptState, CryptoResultImpl* result) 83 Resolver(ScriptState* scriptState, CryptoResultImpl* result)
84 : ScriptPromiseResolver(scriptState) 84 : ScriptPromiseResolver(scriptState)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 m_resolver = Resolver::create(scriptState, this).get(); 215 m_resolver = Resolver::create(scriptState, this).get();
216 } 216 }
217 } 217 }
218 218
219 ScriptPromise CryptoResultImpl::promise() 219 ScriptPromise CryptoResultImpl::promise()
220 { 220 {
221 return m_resolver ? m_resolver->promise() : ScriptPromise(); 221 return m_resolver ? m_resolver->promise() : ScriptPromise();
222 } 222 }
223 223
224 } // namespace blink 224 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/crypto/CryptoResultImpl.h ('k') | Source/modules/crypto/KeyAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698