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

Side by Side Diff: content/browser/browsing_instance.h

Issue 8493016: content: Remove 16 exit time destructors and 15 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CONTENT_BROWSER_BROWSING_INSTANCE_H_ 5 #ifndef CONTENT_BROWSER_BROWSING_INSTANCE_H_
6 #define CONTENT_BROWSER_BROWSING_INSTANCE_H_ 6 #define CONTENT_BROWSER_BROWSING_INSTANCE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/lazy_instance.h"
10 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
12 13
13 class GURL; 14 class GURL;
14 class SiteInstance; 15 class SiteInstance;
15 16
16 namespace content { 17 namespace content {
17 class BrowserContext; 18 class BrowserContext;
18 } 19 }
19 20
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 // Map of site to SiteInstance, to ensure we only have one SiteInstance per 127 // Map of site to SiteInstance, to ensure we only have one SiteInstance per
127 // site. The site string should be the possibly_invalid_spec() of a GURL 128 // site. The site string should be the possibly_invalid_spec() of a GURL
128 // obtained with SiteInstance::GetSiteForURL. Note that this map may not 129 // obtained with SiteInstance::GetSiteForURL. Note that this map may not
129 // contain every active SiteInstance, because a race exists where two 130 // contain every active SiteInstance, because a race exists where two
130 // SiteInstances can be assigned to the same site. This is ok in rare cases. 131 // SiteInstances can be assigned to the same site. This is ok in rare cases.
131 // This field is only used if we are not using process-per-site. 132 // This field is only used if we are not using process-per-site.
132 SiteInstanceMap site_instance_map_; 133 SiteInstanceMap site_instance_map_;
133 134
134 // Global map of BrowserContext to SiteInstanceMap, for process-per-site. 135 // Global map of BrowserContext to SiteInstanceMap, for process-per-site.
135 static ContextSiteInstanceMap context_site_instance_map_; 136 static base::LazyInstance<
Mark Mentovai 2011/11/07 22:34:15 private + static + in a .h file suggests that this
Nico 2011/11/07 23:29:21 I tried that everywhere, but it wasn't trivially p
Nico 2011/11/07 23:37:41 Ah, the problem was that the type depends on SiteI
137 ContextSiteInstanceMap,
138 base::LeakyLazyInstanceTraits<ContextSiteInstanceMap> >
139 context_site_instance_map_;
136 140
137 DISALLOW_COPY_AND_ASSIGN(BrowsingInstance); 141 DISALLOW_COPY_AND_ASSIGN(BrowsingInstance);
138 }; 142 };
139 143
140 #endif // CONTENT_BROWSER_BROWSING_INSTANCE_H_ 144 #endif // CONTENT_BROWSER_BROWSING_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698