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

Side by Side Diff: chrome/browser/content_settings/host_content_settings_map.h

Issue 9159053: Coverity: pass ContentSettingsPattern by const ref (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix MockObserver Created 8 years, 10 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) 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 // Maps hostnames to custom content settings. Written on the UI thread and read 5 // Maps hostnames to custom content settings. Written on the UI thread and read
6 // on any thread. One instance per profile. 6 // on any thread. One instance per profile.
7 7
8 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ 8 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_
9 #define CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ 9 #define CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_
10 #pragma once 10 #pragma once
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 ContentSettingsType content_type); 159 ContentSettingsType content_type);
160 160
161 // Detaches the HostContentSettingsMap from all Profile-related objects like 161 // Detaches the HostContentSettingsMap from all Profile-related objects like
162 // PrefService. This methods needs to be called before destroying the Profile. 162 // PrefService. This methods needs to be called before destroying the Profile.
163 // Afterwards, none of the methods above that should only be called on the UI 163 // Afterwards, none of the methods above that should only be called on the UI
164 // thread should be called anymore. 164 // thread should be called anymore.
165 void ShutdownOnUIThread(); 165 void ShutdownOnUIThread();
166 166
167 // content_settings::Observer implementation. 167 // content_settings::Observer implementation.
168 virtual void OnContentSettingChanged( 168 virtual void OnContentSettingChanged(
169 ContentSettingsPattern primary_pattern, 169 const ContentSettingsPattern& primary_pattern,
170 ContentSettingsPattern secondary_pattern, 170 const ContentSettingsPattern& secondary_pattern,
171 ContentSettingsType content_type, 171 ContentSettingsType content_type,
172 std::string resource_identifier) OVERRIDE; 172 std::string resource_identifier) OVERRIDE;
173 173
174 // Returns true if we should allow all content types for this URL. This is 174 // Returns true if we should allow all content types for this URL. This is
175 // true for various internal objects like chrome:// URLs, so UI and other 175 // true for various internal objects like chrome:// URLs, so UI and other
176 // things users think of as "not webpages" don't break. 176 // things users think of as "not webpages" don't break.
177 static bool ShouldAllowAllContent(const GURL& primary_url, 177 static bool ShouldAllowAllContent(const GURL& primary_url,
178 const GURL& secondary_url, 178 const GURL& secondary_url,
179 ContentSettingsType content_type); 179 ContentSettingsType content_type);
180 180
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // Content setting providers. 223 // Content setting providers.
224 ProviderMap content_settings_providers_; 224 ProviderMap content_settings_providers_;
225 225
226 // Used around accesses to the following objects to guarantee thread safety. 226 // Used around accesses to the following objects to guarantee thread safety.
227 mutable base::Lock lock_; 227 mutable base::Lock lock_;
228 228
229 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); 229 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap);
230 }; 230 };
231 231
232 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_ 232 #endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698