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

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

Issue 8568039: Revert 110235 - chrome: Remove 14 exit time destructors and 2 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 #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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 return content_accessed_[content_type]; 193 return content_accessed_[content_type];
194 } 194 }
195 195
196 const std::set<std::string>& 196 const std::set<std::string>&
197 TabSpecificContentSettings::BlockedResourcesForType( 197 TabSpecificContentSettings::BlockedResourcesForType(
198 ContentSettingsType content_type) const { 198 ContentSettingsType content_type) const {
199 if (blocked_resources_[content_type].get()) { 199 if (blocked_resources_[content_type].get()) {
200 return *blocked_resources_[content_type]; 200 return *blocked_resources_[content_type];
201 } else { 201 } else {
202 CR_DEFINE_STATIC_LOCAL(std::set<std::string>, empty_set, ()); 202 static std::set<std::string> empty_set;
203 return empty_set; 203 return empty_set;
204 } 204 }
205 } 205 }
206 206
207 void TabSpecificContentSettings::AddBlockedResource( 207 void TabSpecificContentSettings::AddBlockedResource(
208 ContentSettingsType content_type, 208 ContentSettingsType content_type,
209 const std::string& resource_identifier) { 209 const std::string& resource_identifier) {
210 if (!blocked_resources_[content_type].get()) 210 if (!blocked_resources_[content_type].get())
211 blocked_resources_[content_type].reset(new std::set<std::string>()); 211 blocked_resources_[content_type].reset(new std::set<std::string>());
212 blocked_resources_[content_type]->insert(resource_identifier); 212 blocked_resources_[content_type]->insert(resource_identifier);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 return new CookiesTreeModel(cookies_->Clone(), 526 return new CookiesTreeModel(cookies_->Clone(),
527 databases_->Clone(), 527 databases_->Clone(),
528 local_storages_->Clone(), 528 local_storages_->Clone(),
529 session_storages_->Clone(), 529 session_storages_->Clone(),
530 appcaches_->Clone(), 530 appcaches_->Clone(),
531 indexed_dbs_->Clone(), 531 indexed_dbs_->Clone(),
532 file_systems_->Clone(), 532 file_systems_->Clone(),
533 NULL, 533 NULL,
534 true); 534 true);
535 } 535 }
OLDNEW
« no previous file with comments | « chrome/browser/character_encoding.cc ('k') | chrome/browser/google/google_update_settings_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698