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

Side by Side Diff: chrome/common/extensions/docs/templates/articles/app_lifecycle.html

Issue 219213007: Remove .html extension from links (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 unified diff | Download patch
OLDNEW
1 <meta name="doc-family" content="apps"> 1 <meta name="doc-family" content="apps">
2 <h1>Chrome App Lifecycle</h1> 2 <h1>Chrome App Lifecycle</h1>
3 3
4 4
5 <p> 5 <p>
6 The app runtime and event page are responsible 6 The app runtime and event page are responsible
7 for managing the app lifecycle. 7 for managing the app lifecycle.
8 The app runtime manages app installation, 8 The app runtime manages app installation,
9 controls the event page, 9 controls the event page,
10 and can shutdown the app at anytime. 10 and can shutdown the app at anytime.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 <h3 id="local_settings">Storing local settings</h3> 141 <h3 id="local_settings">Storing local settings</h3>
142 142
143 <p> 143 <p>
144 <code>chrome.runtime.onInstalled()</code> 144 <code>chrome.runtime.onInstalled()</code>
145 is called when your app has first been installed, 145 is called when your app has first been installed,
146 or when it has been updated. 146 or when it has been updated.
147 Any time this function is called, 147 Any time this function is called,
148 the <code>onInstalled</code> event is fired. 148 the <code>onInstalled</code> event is fired.
149 The event page can listen for this event and use the 149 The event page can listen for this event and use the
150 <a href="storage.html">Storage API</a> 150 <a href="storage">Storage API</a>
151 to store and update local settings 151 to store and update local settings
152 (see also <a href="app_storage.html#options">Storage options</a>). 152 (see also <a href="app_storage#options">Storage options</a>).
153 </p> 153 </p>
154 154
155 <pre data-filename="background.js"> 155 <pre data-filename="background.js">
156 chrome.runtime.onInstalled.addListener(function() { 156 chrome.runtime.onInstalled.addListener(function() {
157 chrome.storage.local.set(object items, function callback); 157 chrome.storage.local.set(object items, function callback);
158 }); 158 });
159 </pre> 159 </pre>
160 160
161 <h3 id="preventing_loss">Preventing data loss</h3> 161 <h3 id="preventing_loss">Preventing data loss</h3>
162 162
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 Keep the clean-up tasks synchronous and simple. 200 Keep the clean-up tasks synchronous and simple.
201 </p> 201 </p>
202 202
203 <pre data-filename="background.js"> 203 <pre data-filename="background.js">
204 chrome.runtime.onSuspend.addListener(function() { 204 chrome.runtime.onSuspend.addListener(function() {
205 // Do some simple clean-up tasks. 205 // Do some simple clean-up tasks.
206 }); 206 });
207 </pre> 207 </pre>
208 208
209 <p class="backtotop"><a href="#top">Back to top</a></p> 209 <p class="backtotop"><a href="#top">Back to top</a></p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698