OLD | NEW |
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 #include "chrome/browser/extensions/api/declarative/rules_registry_storage_deleg
ate.h" | 5 #include "chrome/browser/extensions/api/declarative/rules_registry_storage_deleg
ate.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/extensions/extension_info_map.h" | 8 #include "chrome/browser/extensions/extension_info_map.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 public base::RefCountedThreadSafe<Inner> { | 58 public base::RefCountedThreadSafe<Inner> { |
59 public: | 59 public: |
60 Inner(Profile* profile, | 60 Inner(Profile* profile, |
61 RulesRegistryWithCache* rules_registry, | 61 RulesRegistryWithCache* rules_registry, |
62 const std::string& storage_key); | 62 const std::string& storage_key); |
63 | 63 |
64 private: | 64 private: |
65 friend class base::RefCountedThreadSafe<Inner>; | 65 friend class base::RefCountedThreadSafe<Inner>; |
66 friend class RulesRegistryStorageDelegate; | 66 friend class RulesRegistryStorageDelegate; |
67 | 67 |
68 ~Inner(); | 68 virtual ~Inner(); |
69 | 69 |
70 // Initialization of the storage delegate if it is used in the context of | 70 // Initialization of the storage delegate if it is used in the context of |
71 // an incognito profile. | 71 // an incognito profile. |
72 void InitForOTRProfile(); | 72 void InitForOTRProfile(); |
73 | 73 |
74 // NotificationObserver | 74 // NotificationObserver |
75 virtual void Observe( | 75 virtual void Observe( |
76 int type, | 76 int type, |
77 const content::NotificationSource& source, | 77 const content::NotificationSource& source, |
78 const content::NotificationDetails& details) OVERRIDE; | 78 const content::NotificationDetails& details) OVERRIDE; |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 void RulesRegistryStorageDelegate::Inner::NotifyReadyOnRegistryThread() { | 298 void RulesRegistryStorageDelegate::Inner::NotifyReadyOnRegistryThread() { |
299 DCHECK(content::BrowserThread::CurrentlyOn(rules_registry_thread_)); | 299 DCHECK(content::BrowserThread::CurrentlyOn(rules_registry_thread_)); |
300 if (ready_) | 300 if (ready_) |
301 return; // we've already notified our readiness | 301 return; // we've already notified our readiness |
302 | 302 |
303 ready_ = true; | 303 ready_ = true; |
304 rules_registry_->OnReady(); | 304 rules_registry_->OnReady(); |
305 } | 305 } |
306 | 306 |
307 } // namespace extensions | 307 } // namespace extensions |
OLD | NEW |