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

Side by Side Diff: chrome/common/extensions/extension_error_reporter.cc

Issue 251012: Assert that thread-safe reference counting is used with... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « chrome/browser/visitedlink_master.cc ('k') | chrome/test/in_process_browser_test.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 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #include "chrome/common/extensions/extension_error_reporter.h" 5 #include "chrome/common/extensions/extension_error_reporter.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include "app/win_util.h" 10 #include "app/win_util.h"
11 #elif defined(OS_MACOSX) 11 #elif defined(OS_MACOSX)
12 #include "base/scoped_cftyperef.h" 12 #include "base/scoped_cftyperef.h"
13 #include "base/sys_string_conversions.h" 13 #include "base/sys_string_conversions.h"
14 #include <CoreFoundation/CFUserNotification.h> 14 #include <CoreFoundation/CFUserNotification.h>
15 #endif 15 #endif
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/message_loop.h" 17 #include "base/message_loop.h"
18 #include "base/string_util.h" 18 #include "base/string_util.h"
19 19
20 // No AddRef required when using ExtensionErrorReporter with RunnableMethod. 20 // No AddRef required when using ExtensionErrorReporter with RunnableMethod.
21 // This is okay since the ExtensionErrorReporter is a singleton that lives until 21 // This is okay since the ExtensionErrorReporter is a singleton that lives until
22 // the end of the process. 22 // the end of the process.
23 template <> struct RunnableMethodTraits<ExtensionErrorReporter> { 23 template <> struct RunnableMethodTraits<ExtensionErrorReporter> {
24 static void RetainCallee(ExtensionErrorReporter*) {} 24 void RetainCallee(ExtensionErrorReporter*) {}
25 static void ReleaseCallee(ExtensionErrorReporter*) {} 25 void ReleaseCallee(ExtensionErrorReporter*) {}
26 }; 26 };
27 27
28 ExtensionErrorReporter* ExtensionErrorReporter::instance_ = NULL; 28 ExtensionErrorReporter* ExtensionErrorReporter::instance_ = NULL;
29 29
30 // static 30 // static
31 void ExtensionErrorReporter::Init(bool enable_noisy_errors) { 31 void ExtensionErrorReporter::Init(bool enable_noisy_errors) {
32 if (!instance_) { 32 if (!instance_) {
33 instance_ = new ExtensionErrorReporter(enable_noisy_errors); 33 instance_ = new ExtensionErrorReporter(enable_noisy_errors);
34 } 34 }
35 } 35 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 } 81 }
82 82
83 const std::vector<std::string>* ExtensionErrorReporter::GetErrors() { 83 const std::vector<std::string>* ExtensionErrorReporter::GetErrors() {
84 return &errors_; 84 return &errors_;
85 } 85 }
86 86
87 void ExtensionErrorReporter::ClearErrors() { 87 void ExtensionErrorReporter::ClearErrors() {
88 errors_.clear(); 88 errors_.clear();
89 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/visitedlink_master.cc ('k') | chrome/test/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698