CSC/ECE 517 Spring 2016/Implement private browsing: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 47: Line 47:




We are working on implementing the function to set this member based on the mozprivatebrowsing attribute. We are in touch with Josh regarding the same as currently there is no mozprivatebrowsing attribute in the servo project and hence we are trying to understand how it can be implemented. We have written a basic stub for the same which is as below.
We have implemented the function to set this member based on the mozprivatebrowsing attribute.


[[File: Selection_002.png ]]
[[File:Example.jpg]]


===Step 2===
===Step 2===
Line 55: Line 55:
We have created an enum 'ConstellationMsg' that holds an isPrivate message containing pipelineId and sender as attributes.
We have created an enum 'ConstellationMsg' that holds an isPrivate message containing pipelineId and sender as attributes.


[[File: Selection_003.png ]]
[[File:Example.jpg]]


The below member has been added to the pipeline struct to check if it's private
The below member has been added to the pipeline struct to check if it's private
Line 66: Line 66:




[[File: Selection_005.png ]]
[[File:Example.jpg]]


===Design Pattern===
===Design Pattern===

Revision as of 02:35, 2 April 2016

Implement Private Browsing

Servo<ref>https://github.com/servo/servo</ref> is a prototype web browser engine written in the RUST language. Servo currently does not support the mode where the cookies, login, history and downloads are forgotten after the session ends. The goal of this project is to implement incognito/private browsing feature in Servo.


Introduction

Servo is an experimental web browser layout engine being developed by Mozilla Research. Servo is written in the Rust<ref> https://doc.rust-lang.org/ </ref> language, which is also being developed by Mozilla Research. The language is being refined through feedback from Servo development, and writing the Rust compiler itself. Rust is a systems programming language similar to C and C++ in syntax (but semantically very different). The emphasis is on speed, safety, concurrency and control of memory layout.

Motivation

When a user browses the web, Firefox remembers lots of information for the user - like the sites visited. There may be times, however, when the users don't want people with access to their computer to see this information, such as when shopping for a present. Private Browsing allows the users to browse the Internet without saving any information about which sites and pages they have visited. Private Browsing also includes Tracking Protection in Private Browsing, which prevents companies from tracking the browsing history across multiple sites.[1]

Installing Servo

Prerequisites on Debian based linuxes

    sudo apt-get install curl freeglut3-dev autoconf \
    libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
    gperf g++ build-essential cmake virtualenv python-pip \
    libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
    libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev

Building Servo

git clone https://github.com/servo/servo
cd servo
./mach build --dev

Running Servo

./mach run [url] --devtools <port number>

Implementation

The below mentioned steps were followed to implement private browsing. The detailed requirements are described in the document available here:[2].

Step 1

As per the requirement, we have added the is_private member to the struct IFrameLoadInfo to check if it's a private iframe or not


We have implemented the function to set this member based on the mozprivatebrowsing attribute.

Step 2

We have created an enum 'ConstellationMsg' that holds an isPrivate message containing pipelineId and sender as attributes.

The below member has been added to the pipeline struct to check if it's private

Step 2

The below function is to check whether the pipeline is private or not.


Design Pattern

As per the design document, we have added few fields/members, defined an enum and added a method. The requirements did not require any design pattern to be implemented as such and thus, we have not used any design pattern for the code we have written.

Testing

For this particular project, an automated test is to be created to test the functionality which is part of the subsequent steps and is not included in the initial steps, and hence at this point of time the users/reviewers are not supposed perform any manual testing or testing from GUI. More details about writing the automated test for this project can be found here.

References

<references/>