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

Side by Side Diff: chrome/browser/notifications/notification_channels_provider_android.cc

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: rebased Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/notifications/notification_channels_provider_android.h" 5 #include "chrome/browser/notifications/notification_channels_provider_android.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 14 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "components/content_settings/core/browser/content_settings_details.h" 16 #include "components/content_settings/core/browser/content_settings_details.h"
17 #include "components/content_settings/core/browser/content_settings_rule.h" 17 #include "components/content_settings/core/browser/content_settings_rule.h"
18 #include "components/content_settings/core/browser/content_settings_utils.h" 18 #include "components/content_settings/core/browser/content_settings_utils.h"
19 #include "components/content_settings/core/browser/host_content_settings_map.h" 19 #include "components/content_settings/core/browser/host_content_settings_map.h"
20 #include "components/content_settings/core/common/content_settings.h" 20 #include "components/content_settings/core/common/content_settings.h"
21 #include "components/content_settings/core/common/content_settings_pattern.h" 21 #include "components/content_settings/core/common/content_settings_pattern.h"
22 #include "components/content_settings/core/common/content_settings_utils.h"
22 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
23 #include "jni/NotificationSettingsBridge_jni.h" 24 #include "jni/NotificationSettingsBridge_jni.h"
24 #include "url/gurl.h" 25 #include "url/gurl.h"
25 #include "url/origin.h" 26 #include "url/origin.h"
26 #include "url/url_constants.h" 27 #include "url/url_constants.h"
27 28
28 using base::android::AttachCurrentThread; 29 using base::android::AttachCurrentThread;
29 using base::android::ConvertUTF8ToJavaString; 30 using base::android::ConvertUTF8ToJavaString;
30 using base::android::ScopedJavaLocalRef; 31 using base::android::ScopedJavaLocalRef;
31 32
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 if (old_channel_status == NotificationChannelStatus::UNAVAILABLE) { 237 if (old_channel_status == NotificationChannelStatus::UNAVAILABLE) {
237 bridge_->CreateChannel( 238 bridge_->CreateChannel(
238 origin_string, 239 origin_string,
239 new_channel_status == NotificationChannelStatus::ENABLED); 240 new_channel_status == NotificationChannelStatus::ENABLED);
240 } else { 241 } else {
241 // TODO(awdf): Maybe remove this DCHECK - channel status could change any 242 // TODO(awdf): Maybe remove this DCHECK - channel status could change any
242 // time so this may be vulnerable to a race condition. 243 // time so this may be vulnerable to a race condition.
243 DCHECK(old_channel_status == new_channel_status); 244 DCHECK(old_channel_status == new_channel_status);
244 } 245 }
245 } 246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698