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

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

Issue 7088017: Split incognito extension content settings in session-only and persistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/content_settings/mock_settings_observer.h"
6
7 #include "chrome/browser/content_settings/content_settings_details.h"
8 #include "chrome/browser/content_settings/host_content_settings_map.h"
9 #include "content/common/notification_service.h"
10 #include "content/common/notification_source.h"
11 #include "googleurl/src/gurl.h"
12
13 MockSettingsObserver::MockSettingsObserver() {
14 registrar_.Add(this, NotificationType::CONTENT_SETTINGS_CHANGED,
15 NotificationService::AllSources());
16 }
17
18 MockSettingsObserver::~MockSettingsObserver() {}
19
20 void MockSettingsObserver::Observe(NotificationType type,
21 const NotificationSource& source,
22 const NotificationDetails& details) {
23 HostContentSettingsMap* map =
24 Source<HostContentSettingsMap>(source).ptr();
25 ContentSettingsDetails* settings_details =
26 Details<ContentSettingsDetails>(details).ptr();
27 OnContentSettingsChanged(map,
28 settings_details->type(),
29 settings_details->update_all_types(),
30 settings_details->pattern(),
31 settings_details->update_all());
32 // This checks that calling a Get function from an observer doesn't
33 // deadlock.
34 map->GetContentSettings(GURL("http://random-hostname.com/"));
35 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/mock_settings_observer.h ('k') | chrome/browser/content_settings/stub_settings_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698