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

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

Issue 9117038: Convert all remaining explicit LeakyLazyInstanceTraits users to ::Leaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
OLDNEW
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 #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/lazy_instance.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/browser/browser_context.h"
Ami GONE FROM CHROMIUM 2012/01/24 18:14:27 This is needed to pick up the definition of hash<B
13 14
14 class GURL; 15 class GURL;
15 class SiteInstance; 16 class SiteInstance;
16 17
17 namespace content {
18 class BrowserContext;
19 }
20
21 /////////////////////////////////////////////////////////////////////////////// 18 ///////////////////////////////////////////////////////////////////////////////
22 // 19 //
23 // BrowsingInstance class 20 // BrowsingInstance class
24 // 21 //
25 // A browsing instance corresponds to the notion of a "unit of related browsing 22 // A browsing instance corresponds to the notion of a "unit of related browsing
26 // contexts" in the HTML 5 spec. Intuitively, it represents a collection of 23 // contexts" in the HTML 5 spec. Intuitively, it represents a collection of
27 // tabs and frames that can have script connections to each other. In that 24 // tabs and frames that can have script connections to each other. In that
28 // sense, it reflects the user interface, and not the contents of the tabs and 25 // sense, it reflects the user interface, and not the contents of the tabs and
29 // frames. 26 // frames.
30 // 27 //
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 125
129 // Map of site to SiteInstance, to ensure we only have one SiteInstance per 126 // Map of site to SiteInstance, to ensure we only have one SiteInstance per
130 // site. The site string should be the possibly_invalid_spec() of a GURL 127 // site. The site string should be the possibly_invalid_spec() of a GURL
131 // obtained with SiteInstance::GetSiteForURL. Note that this map may not 128 // obtained with SiteInstance::GetSiteForURL. Note that this map may not
132 // contain every active SiteInstance, because a race exists where two 129 // contain every active SiteInstance, because a race exists where two
133 // SiteInstances can be assigned to the same site. This is ok in rare cases. 130 // SiteInstances can be assigned to the same site. This is ok in rare cases.
134 // This field is only used if we are not using process-per-site. 131 // This field is only used if we are not using process-per-site.
135 SiteInstanceMap site_instance_map_; 132 SiteInstanceMap site_instance_map_;
136 133
137 // Global map of BrowserContext to SiteInstanceMap, for process-per-site. 134 // Global map of BrowserContext to SiteInstanceMap, for process-per-site.
138 static base::LazyInstance< 135 static base::LazyInstance<ContextSiteInstanceMap>::Leaky
139 ContextSiteInstanceMap, 136 context_site_instance_map_;
140 base::LeakyLazyInstanceTraits<ContextSiteInstanceMap> >
141 context_site_instance_map_;
142 137
143 DISALLOW_COPY_AND_ASSIGN(BrowsingInstance); 138 DISALLOW_COPY_AND_ASSIGN(BrowsingInstance);
144 }; 139 };
145 140
146 #endif // CONTENT_BROWSER_BROWSING_INSTANCE_H_ 141 #endif // CONTENT_BROWSER_BROWSING_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698