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

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

Issue 2812113004: Write last_modified date to Content Settings in the PrefProvider (Closed)
Patch Set: rebase Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/content_settings_internal_extension_pr ovider.h" 5 #include "chrome/browser/content_settings/content_settings_internal_extension_pr ovider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/pdf/pdf_extension_util.h" 10 #include "chrome/browser/pdf/pdf_extension_util.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 ContentSettingsPattern primary_pattern = pattern_builder->Build(); 204 ContentSettingsPattern primary_pattern = pattern_builder->Build();
205 ContentSettingsPattern secondary_pattern = ContentSettingsPattern::Wildcard(); 205 ContentSettingsPattern secondary_pattern = ContentSettingsPattern::Wildcard();
206 { 206 {
207 base::AutoLock lock(lock_); 207 base::AutoLock lock(lock_);
208 if (setting == CONTENT_SETTING_DEFAULT) { 208 if (setting == CONTENT_SETTING_DEFAULT) {
209 value_map_.DeleteValue(primary_pattern, 209 value_map_.DeleteValue(primary_pattern,
210 secondary_pattern, 210 secondary_pattern,
211 CONTENT_SETTINGS_TYPE_PLUGINS, 211 CONTENT_SETTINGS_TYPE_PLUGINS,
212 resource); 212 resource);
213 } else { 213 } else {
214 // Do not set a timestamp for extension settings.
214 value_map_.SetValue(primary_pattern, secondary_pattern, 215 value_map_.SetValue(primary_pattern, secondary_pattern,
215 CONTENT_SETTINGS_TYPE_PLUGINS, resource, 216 CONTENT_SETTINGS_TYPE_PLUGINS, resource, base::Time(),
216 new base::Value(setting)); 217 new base::Value(setting));
217 } 218 }
218 } 219 }
219 NotifyObservers(primary_pattern, 220 NotifyObservers(primary_pattern,
220 secondary_pattern, 221 secondary_pattern,
221 CONTENT_SETTINGS_TYPE_PLUGINS, 222 CONTENT_SETTINGS_TYPE_PLUGINS,
222 resource); 223 resource);
223 } 224 }
224 225
225 } // namespace content_settings 226 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698