| Index: chrome/browser/content_exceptions_table_model.h
|
| diff --git a/chrome/browser/content_exceptions_table_model.h b/chrome/browser/content_exceptions_table_model.h
|
| index da8889ee6b4c53bbad0dabd06c32170f23446fd8..469dac0991698597400031da2cd257d7bd014434 100644
|
| --- a/chrome/browser/content_exceptions_table_model.h
|
| +++ b/chrome/browser/content_exceptions_table_model.h
|
| @@ -15,18 +15,28 @@
|
| class ContentExceptionsTableModel : public TableModel {
|
| public:
|
| ContentExceptionsTableModel(HostContentSettingsMap* map,
|
| + HostContentSettingsMap* off_the_record_map,
|
| ContentSettingsType content_type);
|
|
|
| HostContentSettingsMap* map() const { return map_; }
|
| + HostContentSettingsMap* off_the_record_map() const {
|
| + return off_the_record_map_;
|
| + }
|
| ContentSettingsType content_type() const { return content_type_; }
|
|
|
| + bool entry_is_off_the_record(int index) {
|
| + return index >= static_cast<int>(entries_.size());
|
| + }
|
| +
|
| const HostContentSettingsMap::PatternSettingPair& entry_at(int index) {
|
| - return entries_[index];
|
| + return (entry_is_off_the_record(index) ?
|
| + off_the_record_entries_[index - entries_.size()] : entries_[index]);
|
| }
|
|
|
| // Adds a new exception on the map and table model.
|
| void AddException(const HostContentSettingsMap::Pattern& pattern,
|
| - ContentSetting setting);
|
| + ContentSetting setting,
|
| + bool is_off_the_record);
|
|
|
| // Removes the exception at the specified index from both the map and model.
|
| void RemoveException(int row);
|
| @@ -36,7 +46,8 @@ class ContentExceptionsTableModel : public TableModel {
|
|
|
| // Returns the index of the specified exception given a host, or -1 if there
|
| // is no exception for the specified host.
|
| - int IndexOfExceptionByPattern(const HostContentSettingsMap::Pattern& pattern);
|
| + int IndexOfExceptionByPattern(const HostContentSettingsMap::Pattern& pattern,
|
| + bool is_off_the_record);
|
|
|
| // TableModel overrides:
|
| virtual int RowCount();
|
| @@ -44,9 +55,18 @@ class ContentExceptionsTableModel : public TableModel {
|
| virtual void SetObserver(TableModelObserver* observer);
|
|
|
| private:
|
| + HostContentSettingsMap* map(bool is_off_the_record) {
|
| + return is_off_the_record ? off_the_record_map_ : map_;
|
| + }
|
| + HostContentSettingsMap::SettingsForOneType& entries(bool is_off_the_record) {
|
| + return is_off_the_record ? off_the_record_entries_ : entries_;
|
| + }
|
| +
|
| HostContentSettingsMap* map_;
|
| + HostContentSettingsMap* off_the_record_map_;
|
| ContentSettingsType content_type_;
|
| HostContentSettingsMap::SettingsForOneType entries_;
|
| + HostContentSettingsMap::SettingsForOneType off_the_record_entries_;
|
| TableModelObserver* observer_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ContentExceptionsTableModel);
|
|
|