Commit 66846f12 authored by zengster's avatar zengster Committed by Commit bot

Added diagrams to installer README

Review-Url: https://codereview.chromium.org/2290063002
Cr-Commit-Position: refs/heads/master@{#415307}
parent eba3e4e9
# Chrome Installer for Mac -- the repository!
This Mac app installs Chrome on the machine it's run on. It's meant to be the
Mac app the user first downloads when they click 'Download Chrome' on a Mac
machine. After the user runs the app, Chrome would launch directly after
installation completes successfully.
## The 10,000 Foot View
This Mac app installs Chrome on the machine it's run on. To do so, it breaks
down installation into the following basic steps:
The installer breaks down its task into the following steps:
1. __OmahaCommunication__: Ask Omaha for a URL of the most recent compatible
copy of the Google Chrome disk image in Google's servers.
......@@ -38,29 +42,134 @@ default) immediately, then waits until the installer has progressed to step 4
## The Class Breakdown
AppDelegate | Controls the flow of the program
AuthorizedInstall | Attempts authorization to add Chrome to
| Applications folder and adjust permissions as root
Downloader | Downloads GoogleChrome.dmg from Omaha Servers
InstallerWindowController | Controls the user interface
OmahaCommunication | Talks with Omaha Servers to get URL of disk image
OmahaXMLParser | Extracts URLs from Omaha's XML response.
OmahaXMLRequest | Creates an XML request to send to Omaha.
SystemInfo | Provides system information to help craft the XML
| request for Omaha.
Unpacker | Mounts the disk image and controls the temporary
| directory that abstracts the installer's
| file-manipulating activity from the user.
| Class | Role |
|----------------------------|----------------------------------------------------|
| AppDelegate | Controls the flow of the program |
| AuthorizedInstall | Attempts authorization to add Chrome to the Applications folder and adjust permissions as root |
| Downloader | Downloads GoogleChrome.dmg from Omaha servers |
| InstallerWindowController | Controls the user interface |
| OmahaCommunication | Talks with Omaha Servers to get URL of disk image |
| OmahaXMLParser | Extracts URLs from Omaha's XML response |
| OmahaXMLRequest | Creates an XML request to send to Omaha |
| SystemInfo | Provides system information to help craft the XML request for Omaha |
| Unpacker | Mounts the disk image and controls the temporary directory that abstracts the installer's file-manipulating activity from the user |
## The Future
Here lies a list of hopes and dreams:
* Implement resumable downloads.
* Add in adequate testing using a local test server.
* Include basic error recovery attempts -- say, if during a download a URL
does not provide a valid disk image, the installer can try re-downloading
the disk image from another URL.
* Manage potential conflicts, in the case that Google Chrome already exists in
the Applications folder when the installer is run.
* Trash the installer application after it has completed running.
\ No newline at end of file
* Implement resumable downloads.
* Add in adequate testing using a local test server.
* Include basic error recovery attempts -- say, if during a download a URL
does not provide a valid disk image, the installer can try re-downloading
the disk image from another URL.
* Manage potential conflicts, in the case that Google Chrome already exists in
the Applications folder when the installer is run.
* Trash the installer application after it has completed running.
## Diagram Appendix
### Task Flow
```
Exposed Errors Main Logic
+--------------------------------------+
| |
| Request authentication from users |
| |
+------------------+-------------------+
|
+------------------v-------------------+
| |
+--------+ Ask Omaha for appropriate Chrome app |
v | |
+------------------+-------------------+
Network Error |
+------------------v-------------------+
^ | |
+--------+ Parse the response from Omaha |
| |
+------------------+-------------------+
|
+------------------v-------------------+
| |
Download Error <-+ Download the Chrome disk image |
| |
+------------------+-------------------+
|
+------------------v-------------------+
| |
+--------+ Mount the disk image |
v | |
+------------------+-------------------+
Install Error |
+------------------v-------------------+
^ | |
+--------+ Install & Configure Chrome app |
| |
+------------------+-------------------+
|
+------------------v-------------------+
| |
| Unmount disk image +-> If unmount fails, system
| | restart can resolve this.
+------------------+-------------------+
|
+------------------v-------------------+
| |
Launch Error <-+ Launch Chrome |
| |
+--------------------------------------+
```
### Class Heirarchy
```
Users
^ +
| |
| |
+-------------------------------+-----v--------------------------------+
| |
| InstallerWindowController |
| |
+-------+------^------------+---^--------+----^---------+---------^----+
| | | | | | | |
| | | | | | | |
| | | | | | | |
+-------v------+------------v---+--------v----+---------v---------+----+
| |
| AppDelegate |
| |
+-------+------^------------+---^--------+----^---------+---------^----+
| | | | | | | |
| | | | | | | |
| | | | | | | |
+-------v------+-----+ +----v---+---+ +--v----+--+ +----v---------+----+
| | | | | | | |
| OmahaCommunication | | Downloader | | Unpacker | | AuthorizedInstall |
| | | | | | | |
+-------^------^-----+ +------------+ +----------+ +---------^---------+
| | |
| +------------+ |
| | |
+-------+---------+ +-------+--------+ +--------+--------+
| | | | | |
| OmahaXMLRequest | | OmahaXMLParser | | copy_to_disk.sh |
| | | | | |
+-------^---------+ +----------------+ +-----------------+
|
|
|
+-----+------+
| |
| SystemInfo |
| |
+------------+
```
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment