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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/PopupExceptionInfo.java

Issue 1068223002: Implement Site Settings \ Images category. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and fix merge conflict Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/PopupExceptionInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/PopupExceptionInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/PopupExceptionInfo.java
deleted file mode 100644
index a6ff7fbd07b5efd1c894678275d89f8c272c01cd..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/PopupExceptionInfo.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.preferences.website;
-
-import org.chromium.chrome.browser.preferences.PrefServiceBridge;
-
-import java.io.Serializable;
-
-/**
- * Popup exception information for a given URL pattern.
- */
-public class PopupExceptionInfo implements Serializable {
- private final String mPattern;
- private final String mSetting;
- private final String mSource;
-
- public PopupExceptionInfo(String pattern, String setting, String source) {
- mPattern = pattern;
- mSetting = setting;
- mSource = source;
- }
-
- public String getPattern() {
- return mPattern;
- }
-
- public String getSetting() {
- return mPattern;
- }
-
- public String getSource() {
- return mSource;
- }
-
- /**
- * @return The ContentSetting specifying whether popups are allowed for this pattern.
- */
- public ContentSetting getContentSetting() {
- if (mSetting.equals(PrefServiceBridge.EXCEPTION_SETTING_ALLOW)) {
- return ContentSetting.ALLOW;
- } else if (mSetting.equals(PrefServiceBridge.EXCEPTION_SETTING_BLOCK)) {
- return ContentSetting.BLOCK;
- } else {
- return null;
- }
- }
-
- /**
- * Sets whether popups are allowed for this pattern.
- */
- public void setContentSetting(ContentSetting value) {
- if (value != null) {
- PrefServiceBridge.getInstance().setPopupException(
- mPattern, value == ContentSetting.ALLOW ? true : false);
- } else {
- PrefServiceBridge.getInstance().removePopupException(mPattern);
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698