| OLD | NEW | 
|---|
| 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/host_content_settings_map.h" | 5 #include "chrome/browser/content_settings/host_content_settings_map.h" | 
| 6 | 6 | 
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" | 
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" | 
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" | 
| 10 #include "chrome/browser/browser_thread.h" | 10 #include "chrome/browser/browser_thread.h" | 
| 11 #include "chrome/browser/content_settings/content_settings_details.h" | 11 #include "chrome/browser/content_settings/content_settings_details.h" | 
| 12 #include "chrome/browser/content_settings/content_settings_provider.h" | 12 #include "chrome/browser/content_settings/content_settings_provider.h" | 
| 13 #include "chrome/browser/content_settings/policy_content_settings_provider.h" | 13 #include "chrome/browser/content_settings/policy_content_settings_provider.h" | 
| 14 #include "chrome/browser/content_settings/pref_content_settings_provider.h" | 14 #include "chrome/browser/content_settings/pref_content_settings_provider.h" | 
| 15 #include "chrome/browser/metrics/user_metrics.h" | 15 #include "chrome/browser/metrics/user_metrics.h" | 
| 16 #include "chrome/browser/prefs/pref_service.h" | 16 #include "chrome/browser/prefs/pref_service.h" | 
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" | 
| 18 #include "chrome/browser/prefs/scoped_pref_update.h" | 18 #include "chrome/browser/prefs/scoped_pref_update.h" | 
| 19 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" | 
| 20 #include "chrome/common/notification_source.h" | 20 #include "chrome/common/notification_source.h" | 
| 21 #include "chrome/common/notification_type.h" | 21 #include "chrome/common/notification_type.h" | 
| 22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" | 
| 23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" | 
| 24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" | 
| 25 #include "googleurl/src/gurl.h" | 25 #include "googleurl/src/gurl.h" | 
| 26 #include "net/base/net_util.h" | 26 #include "net/base/net_util.h" | 
| 27 #include "net/base/static_cookie_policy.h" | 27 #include "net/base/static_cookie_policy.h" | 
| 28 | 28 | 
|  | 29 using content_settings::DefaultContentSettingsProvider; | 
|  | 30 using content_settings::PrefContentSettingsProvider; | 
|  | 31 using content_settings::PolicyContentSettingsProvider; | 
|  | 32 | 
| 29 namespace { | 33 namespace { | 
| 30 | 34 | 
| 31 // The preference keys where resource identifiers are stored for | 35 // The preference keys where resource identifiers are stored for | 
| 32 // ContentSettingsType values that support resource identifiers. | 36 // ContentSettingsType values that support resource identifiers. | 
| 33 const char* kResourceTypeNames[CONTENT_SETTINGS_NUM_TYPES] = { | 37 const char* kResourceTypeNames[CONTENT_SETTINGS_NUM_TYPES] = { | 
| 34   NULL, | 38   NULL, | 
| 35   NULL, | 39   NULL, | 
| 36   NULL, | 40   NULL, | 
| 37   "per_plugin", | 41   "per_plugin", | 
| 38   NULL, | 42   NULL, | 
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 974   } | 978   } | 
| 975 | 979 | 
| 976   for (size_t i = 0; i < move_items.size(); ++i) { | 980   for (size_t i = 0; i < move_items.size(); ++i) { | 
| 977     Value* pattern_settings_dictionary = NULL; | 981     Value* pattern_settings_dictionary = NULL; | 
| 978     all_settings_dictionary->RemoveWithoutPathExpansion( | 982     all_settings_dictionary->RemoveWithoutPathExpansion( | 
| 979         move_items[i].first, &pattern_settings_dictionary); | 983         move_items[i].first, &pattern_settings_dictionary); | 
| 980     all_settings_dictionary->SetWithoutPathExpansion( | 984     all_settings_dictionary->SetWithoutPathExpansion( | 
| 981         move_items[i].second, pattern_settings_dictionary); | 985         move_items[i].second, pattern_settings_dictionary); | 
| 982   } | 986   } | 
| 983 } | 987 } | 
| OLD | NEW | 
|---|