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

Side by Side Diff: ceee/ie/plugin/bho/cookie_accountant.h

Issue 5581008: Add a new GetInstance() method for singleton classes, take 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Defines the CookieAccountant class, which is responsible for observing 5 // Defines the CookieAccountant class, which is responsible for observing
6 // and recording all cookie-related information generated by a particular 6 // and recording all cookie-related information generated by a particular
7 // IE browser session. It records and fires cookie change events, it provides 7 // IE browser session. It records and fires cookie change events, it provides
8 // access to session and persistent cookies. 8 // access to session and persistent cookies.
9 9
10 #ifndef CEEE_IE_PLUGIN_BHO_COOKIE_ACCOUNTANT_H_ 10 #ifndef CEEE_IE_PLUGIN_BHO_COOKIE_ACCOUNTANT_H_
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // The funnel for sending cookie events to the broker. 119 // The funnel for sending cookie events to the broker.
120 CookieEventsFunnel cookie_events_funnel_; 120 CookieEventsFunnel cookie_events_funnel_;
121 121
122 DISALLOW_COPY_AND_ASSIGN(CookieAccountant); 122 DISALLOW_COPY_AND_ASSIGN(CookieAccountant);
123 }; 123 };
124 124
125 // A singleton that initializes and keeps the CookieAccountant used by 125 // A singleton that initializes and keeps the CookieAccountant used by
126 // production code. This class is separate so that CookieAccountant can still 126 // production code. This class is separate so that CookieAccountant can still
127 // be accessed for unit testing. 127 // be accessed for unit testing.
128 class ProductionCookieAccountant : public CookieAccountant, 128 class ProductionCookieAccountant : public CookieAccountant {
129 public Singleton<ProductionCookieAccountant> { 129 public:
130 static ProductionCookieAccountant* GetInstance();
131
130 private: 132 private:
131 // This ensures no construction is possible outside of the class itself. 133 // This ensures no construction is possible outside of the class itself.
132 friend struct DefaultSingletonTraits<ProductionCookieAccountant>; 134 friend struct DefaultSingletonTraits<ProductionCookieAccountant>;
133 DISALLOW_IMPLICIT_CONSTRUCTORS(ProductionCookieAccountant); 135 DISALLOW_IMPLICIT_CONSTRUCTORS(ProductionCookieAccountant);
134 }; 136 };
135 137
136 #endif // CEEE_IE_PLUGIN_BHO_COOKIE_ACCOUNTANT_H_ 138 #endif // CEEE_IE_PLUGIN_BHO_COOKIE_ACCOUNTANT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698