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

Side by Side Diff: chrome/browser/speech/extension_api/tts_extension_api_platform.h

Issue 10413054: Make ExtensionTtsPlatformImplWin a leaky singleton to avoid a crash in the destructor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add crbug link to comment Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/speech/extension_api/tts_extension_api_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_ 5 #ifndef CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_
6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_ 6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Return the gender of the voice, should be either "male" or "female" 46 // Return the gender of the voice, should be either "male" or "female"
47 // if known, otherwise the empty string. 47 // if known, otherwise the empty string.
48 virtual std::string gender(); 48 virtual std::string gender();
49 49
50 virtual std::string error(); 50 virtual std::string error();
51 virtual void clear_error(); 51 virtual void clear_error();
52 virtual void set_error(const std::string& error); 52 virtual void set_error(const std::string& error);
53 53
54 protected: 54 protected:
55 ExtensionTtsPlatformImpl() {} 55 ExtensionTtsPlatformImpl() {}
56
57 // On some platforms this may be a leaky singleton - do not rely on the
58 // destructor being called! http://crbug.com/122026
56 virtual ~ExtensionTtsPlatformImpl() {} 59 virtual ~ExtensionTtsPlatformImpl() {}
57 60
58 std::string error_; 61 std::string error_;
59 62
60 DISALLOW_COPY_AND_ASSIGN(ExtensionTtsPlatformImpl); 63 DISALLOW_COPY_AND_ASSIGN(ExtensionTtsPlatformImpl);
61 }; 64 };
62 65
63 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_ 66 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/speech/extension_api/tts_extension_api_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698