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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 8573021: chrome: Remove 14 exit time destructors and 2 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hopefully fix problems seen on the bots 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 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 return content_accessed_[content_type]; 194 return content_accessed_[content_type];
195 } 195 }
196 196
197 const std::set<std::string>& 197 const std::set<std::string>&
198 TabSpecificContentSettings::BlockedResourcesForType( 198 TabSpecificContentSettings::BlockedResourcesForType(
199 ContentSettingsType content_type) const { 199 ContentSettingsType content_type) const {
200 if (blocked_resources_[content_type].get()) { 200 if (blocked_resources_[content_type].get()) {
201 return *blocked_resources_[content_type]; 201 return *blocked_resources_[content_type];
202 } else { 202 } else {
203 static std::set<std::string> empty_set; 203 CR_DEFINE_STATIC_LOCAL(std::set<std::string>, empty_set, ());
204 return empty_set; 204 return empty_set;
205 } 205 }
206 } 206 }
207 207
208 void TabSpecificContentSettings::AddBlockedResource( 208 void TabSpecificContentSettings::AddBlockedResource(
209 ContentSettingsType content_type, 209 ContentSettingsType content_type,
210 const std::string& resource_identifier) { 210 const std::string& resource_identifier) {
211 if (!blocked_resources_[content_type].get()) 211 if (!blocked_resources_[content_type].get())
212 blocked_resources_[content_type].reset(new std::set<std::string>()); 212 blocked_resources_[content_type].reset(new std::set<std::string>());
213 blocked_resources_[content_type]->insert(resource_identifier); 213 blocked_resources_[content_type]->insert(resource_identifier);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 return new CookiesTreeModel(cookies_->Clone(), 514 return new CookiesTreeModel(cookies_->Clone(),
515 databases_->Clone(), 515 databases_->Clone(),
516 local_storages_->Clone(), 516 local_storages_->Clone(),
517 session_storages_->Clone(), 517 session_storages_->Clone(),
518 appcaches_->Clone(), 518 appcaches_->Clone(),
519 indexed_dbs_->Clone(), 519 indexed_dbs_->Clone(),
520 file_systems_->Clone(), 520 file_systems_->Clone(),
521 NULL, 521 NULL,
522 true); 522 true);
523 } 523 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698