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

Side by Side Diff: components/content_settings/core/browser/content_settings_rule.cc

Issue 2812113004: Write last_modified date to Content Settings in the PrefProvider (Closed)
Patch Set: fix comments Created 3 years, 8 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) 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 "components/content_settings/core/browser/content_settings_rule.h" 5 #include "components/content_settings/core/browser/content_settings_rule.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace content_settings { 11 namespace content_settings {
12 12
13 Rule::Rule() {} 13 Rule::Rule() {}
14 14
15 Rule::Rule( 15 Rule::Rule(const ContentSettingsPattern& primary_pattern,
16 const ContentSettingsPattern& primary_pattern, 16 const ContentSettingsPattern& secondary_pattern,
17 const ContentSettingsPattern& secondary_pattern, 17 base::Time last_modified,
18 base::Value* value) 18 base::Value* value)
19 : primary_pattern(primary_pattern), 19 : primary_pattern(primary_pattern),
20 secondary_pattern(secondary_pattern), 20 secondary_pattern(secondary_pattern),
21 last_modified(last_modified),
21 value(value) { 22 value(value) {
22 DCHECK(value); 23 DCHECK(value);
23 } 24 }
24 25
25 Rule::Rule(const Rule& other) = default; 26 Rule::Rule(const Rule& other) = default;
26 27
27 Rule::~Rule() {} 28 Rule::~Rule() {}
28 29
29 RuleIterator::~RuleIterator() {} 30 RuleIterator::~RuleIterator() {}
30 31
(...skipping 20 matching lines...) Expand all
51 auto current_iterator = iterators_.begin(); 52 auto current_iterator = iterators_.begin();
52 DCHECK(current_iterator != iterators_.end()); 53 DCHECK(current_iterator != iterators_.end());
53 DCHECK((*current_iterator)->HasNext()); 54 DCHECK((*current_iterator)->HasNext());
54 const Rule& to_return = (*current_iterator)->Next(); 55 const Rule& to_return = (*current_iterator)->Next();
55 if (!(*current_iterator)->HasNext()) 56 if (!(*current_iterator)->HasNext())
56 iterators_.erase(current_iterator); 57 iterators_.erase(current_iterator);
57 return to_return; 58 return to_return;
58 } 59 }
59 60
60 } // namespace content_settings 61 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698