Skip to content
This repository was archived by the owner on Oct 17, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Once authorized, you'll see Timeline Viewer as a registered Google Drive viewer
You can share this URL with any users who have both:

1. authorized [Timeline Viewer](https://chromedevtools.github.io/timeline-viewer/) to Drive via the typical Google OAuth flow and..
1. have `Edit` permission to the Google Drive file
1. have `View` permission to the Google Drive file

<center><img src="https://cloud.githubusercontent.com/assets/39191/18080845/fb39f056-6e4b-11e6-90df-6cda94bd2495.png" width=600></center>

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h4 class="f4 br3 br--top black-60 pv2 mb0" style="display: inline;">Google Driv

<img src="https://cloud.githubusercontent.com/assets/39191/18080010/67390d9a-6e48-11e6-98a3-9c8c81b1df67.png" style="width: 80%; margin: 20px auto; display: block;">

<p>You can share this URL with any users who have both 1) authorized Timeline Viewer to Drive via the typical Google OAuth flow and 2) have <code>Edit</code> permission to the Google Drive file.
<p>You can share this URL with any users who have both 1) authorized Timeline Viewer to Drive via the typical Google OAuth flow and 2) have <code>View</code> permission to the Google Drive file.

<img src="https://cloud.githubusercontent.com/assets/39191/18080845/fb39f056-6e4b-11e6-90df-6cda94bd2495.png" style="width: 80%; margin: 20px auto; display: block;">

Expand Down
2 changes: 1 addition & 1 deletion docs/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class GoogleDrive {
});
return new Promise(resolve => request.execute(resolve));
}
insertPermission(fileId, type = 'anyone', role = 'writer') {
insertPermission(fileId, type = 'anyone', role = 'reader') {
const url = new URL(`https://www.googleapis.com/drive/v2/files/${fileId}/permissions`);
const body = {
role: role,
Expand Down
7 changes: 5 additions & 2 deletions docs/timeline_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class Viewer {
this.makeDevToolsVisible(false);
const reasons = error.errors.map(e => e.reason);
let fileUnavailableStr = '';
fileUnavailableStr += reasons.includes('notFound') ? 'Confirm you have Edit permissions to the file. ' : '';
fileUnavailableStr += reasons.includes('notFound') ? 'Confirm you have View permissions to the file. ' : '';
if (reasons.includes('authError')) {
fileUnavailableStr += 'Please sign in. ';
this.authBtn.hidden = false;
Expand All @@ -302,7 +302,7 @@ class Viewer {

if (!response.downloadUrl) {
this.makeDevToolsVisible(false);
this.updateStatus('Downloading not available. Confirm you have Edit permissions to the file.');
this.updateStatus('Downloading not available. Confirm you have View permissions to the file.');
throw new Error(response.message, response.error);
}

Expand Down Expand Up @@ -374,6 +374,9 @@ class Viewer {
}

async uploadTimelineData() {
if (!window.confirm('Upload this trace to Google Drive? Anyone with the link will be able to view it.')) {
return;
}
const panel = await legacy.InspectorView.InspectorView.instance().panel('timeline');
// TODO: use proper saveToFile flow with better json formatting and its final tweaks to metadata.
this.uploadData(this.devTools.payload);
Expand Down
Loading