LCOV - code coverage report
Current view: top level - extensions/common - DiffWebLinkInfo.java (source / functions) Hit Total Coverage
Test: _coverage_report.dat Lines: 0 7 0.0 %
Date: 2022-11-19 15:00:39 Functions: 0 4 0.0 %

          Line data    Source code
       1             : // Copyright (C) 2014 The Android Open Source Project
       2             : //
       3             : // Licensed under the Apache License, Version 2.0 (the "License");
       4             : // you may not use this file except in compliance with the License.
       5             : // You may obtain a copy of the License at
       6             : //
       7             : // http://www.apache.org/licenses/LICENSE-2.0
       8             : //
       9             : // Unless required by applicable law or agreed to in writing, software
      10             : // distributed under the License is distributed on an "AS IS" BASIS,
      11             : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      12             : // See the License for the specific language governing permissions and
      13             : // limitations under the License.
      14             : 
      15             : package com.google.gerrit.extensions.common;
      16             : 
      17             : public class DiffWebLinkInfo extends WebLinkInfo {
      18             :   public Boolean showOnSideBySideDiffView;
      19             :   public Boolean showOnUnifiedDiffView;
      20             : 
      21             :   public static DiffWebLinkInfo forSideBySideDiffView(
      22             :       String name, String imageUrl, String url, String target) {
      23           0 :     return new DiffWebLinkInfo(name, imageUrl, url, target, true, false);
      24             :   }
      25             : 
      26             :   public static DiffWebLinkInfo forUnifiedDiffView(
      27             :       String name, String imageUrl, String url, String target) {
      28           0 :     return new DiffWebLinkInfo(name, imageUrl, url, target, false, true);
      29             :   }
      30             : 
      31             :   public static DiffWebLinkInfo forSideBySideAndUnifiedDiffView(
      32             :       String name, String imageUrl, String url, String target) {
      33           0 :     return new DiffWebLinkInfo(name, imageUrl, url, target, true, true);
      34             :   }
      35             : 
      36             :   private DiffWebLinkInfo(
      37             :       String name,
      38             :       String imageUrl,
      39             :       String url,
      40             :       String target,
      41             :       boolean showOnSideBySideDiffView,
      42             :       boolean showOnUnifiedDiffView) {
      43           0 :     super(name, imageUrl, url, target);
      44           0 :     this.showOnSideBySideDiffView = showOnSideBySideDiffView ? true : null;
      45           0 :     this.showOnUnifiedDiffView = showOnUnifiedDiffView ? true : null;
      46           0 :   }
      47             : }

Generated by: LCOV version 1.16+git.20220603.dfeb750