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

Side by Side Diff: components/content_settings/core/test/content_settings_test_utils.cc

Issue 1442083002: Stop inheriting push notification permissions from regular to incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetContentSettingValueAndPatterns to HostContentSettingsMap, and address other review comments Created 5 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/content_settings_test_utils.h" 5 #include "components/content_settings/core/test/content_settings_test_utils.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "components/content_settings/core/browser/host_content_settings_map.h"
9 #include "components/content_settings/core/common/content_settings_types.h" 10 #include "components/content_settings/core/common/content_settings_types.h"
10 11
11 namespace content_settings { 12 namespace content_settings {
12 13
13 base::Value* GetContentSettingValue(const ProviderInterface* provider, 14 base::Value* GetContentSettingValue(const ProviderInterface* provider,
14 const GURL& primary_url, 15 const GURL& primary_url,
15 const GURL& secondary_url, 16 const GURL& secondary_url,
16 ContentSettingsType content_type, 17 ContentSettingsType content_type,
17 const std::string& resource_identifier, 18 const std::string& resource_identifier,
18 bool include_incognito) { 19 bool include_incognito) {
19 return GetContentSettingValueAndPatterns(provider, primary_url, secondary_url, 20 return HostContentSettingsMap::GetContentSettingValueAndPatternsInternal(
20 content_type, resource_identifier, 21 provider, primary_url, secondary_url, content_type, resource_identifier,
21 include_incognito, NULL, NULL); 22 include_incognito, NULL, NULL).release();
22 } 23 }
23 24
24 ContentSetting GetContentSetting(const ProviderInterface* provider, 25 ContentSetting GetContentSetting(const ProviderInterface* provider,
25 const GURL& primary_url, 26 const GURL& primary_url,
26 const GURL& secondary_url, 27 const GURL& secondary_url,
27 ContentSettingsType content_type, 28 ContentSettingsType content_type,
28 const std::string& resource_identifier, 29 const std::string& resource_identifier,
29 bool include_incognito) { 30 bool include_incognito) {
30 scoped_ptr<base::Value> value( 31 scoped_ptr<base::Value> value(
31 GetContentSettingValue(provider, primary_url, secondary_url, content_type, 32 GetContentSettingValue(provider, primary_url, secondary_url, content_type,
32 resource_identifier, include_incognito)); 33 resource_identifier, include_incognito));
33 return ValueToContentSetting(value.get()); 34 return ValueToContentSetting(value.get());
34 } 35 }
35 36
36 } // namespace content_settings 37 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698