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

Side by Side Diff: ceee/ie/plugin/bho/webrequest_notifier.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 // Web request notifier implementation. 5 // Web request notifier implementation.
6 #ifndef CEEE_IE_PLUGIN_BHO_WEBREQUEST_NOTIFIER_H_ 6 #ifndef CEEE_IE_PLUGIN_BHO_WEBREQUEST_NOTIFIER_H_
7 #define CEEE_IE_PLUGIN_BHO_WEBREQUEST_NOTIFIER_H_ 7 #define CEEE_IE_PLUGIN_BHO_WEBREQUEST_NOTIFIER_H_
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <wininet.h> 10 #include <wininet.h>
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // Initialization has succeeded. 436 // Initialization has succeeded.
437 SUCCEEDED_TO_INITIALIZE 437 SUCCEEDED_TO_INITIALIZE
438 }; 438 };
439 InitializeState initialize_state_; 439 InitializeState initialize_state_;
440 440
441 private: 441 private:
442 DISALLOW_COPY_AND_ASSIGN(WebRequestNotifier); 442 DISALLOW_COPY_AND_ASSIGN(WebRequestNotifier);
443 }; 443 };
444 444
445 // A singleton that keeps the WebRequestNotifier used by production code. 445 // A singleton that keeps the WebRequestNotifier used by production code.
446 class ProductionWebRequestNotifier 446 class ProductionWebRequestNotifier : public WebRequestNotifier {
447 : public WebRequestNotifier, 447 public:
448 public Singleton<ProductionWebRequestNotifier> { 448 static ProductionWebRequestNotifier* GetInstance();
449
449 private: 450 private:
450 ProductionWebRequestNotifier() {} 451 ProductionWebRequestNotifier() {}
451 452
452 friend struct DefaultSingletonTraits<ProductionWebRequestNotifier>; 453 friend struct DefaultSingletonTraits<ProductionWebRequestNotifier>;
453 DISALLOW_COPY_AND_ASSIGN(ProductionWebRequestNotifier); 454 DISALLOW_COPY_AND_ASSIGN(ProductionWebRequestNotifier);
454 }; 455 };
455 456
456 #endif // CEEE_IE_PLUGIN_BHO_WEBREQUEST_NOTIFIER_H_ 457 #endif // CEEE_IE_PLUGIN_BHO_WEBREQUEST_NOTIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698