Chromium Code Reviews| Index: chrome/browser/resources/chromeos/arc_support/background.js |
| diff --git a/chrome/browser/resources/chromeos/arc_support/background.js b/chrome/browser/resources/chromeos/arc_support/background.js |
| index 66500aff6973db38679efc0f4b5da9718a899c34..40adf3f1bf49612af93a75bf60e8c6d94760355e 100644 |
| --- a/chrome/browser/resources/chromeos/arc_support/background.js |
| +++ b/chrome/browser/resources/chromeos/arc_support/background.js |
| @@ -484,7 +484,7 @@ function showPageWithStatus(pageId, status) { |
| showPage('terms'); |
| return; |
| } |
| - loadInitialTerms(); |
| + loadTerms(); |
| } else { |
| // Explicit request to start not from start page. Assume terms are |
| // accepted in this case. |
| @@ -499,10 +499,16 @@ function showPageWithStatus(pageId, status) { |
| } |
| /** |
| - * Loads initial Play Store terms. |
| + * Loads Play Store terms. |
| */ |
| -function loadInitialTerms() { |
| - termsView.src = 'https://play.google.com/about/play-terms.html'; |
| +function loadTerms() { |
| + if (termsView.src) { |
|
khmel
2016/10/26 20:35:20
This might be dangerous. Assume ToS decides to red
hidehiko
2016/10/27 04:01:48
I don't think the old code handles the case, becau
khmel
2016/10/27 14:40:57
Sorry, don't get what do you mean? Old code has si
hidehiko
2016/10/27 16:41:01
Sorry, I still am confused.
"ToS decides to redir
|
| + // This is reloading the page, typically clicked RETRY on error page. |
| + termsView.reload(); |
| + } else { |
| + // This is first loading case so set the URL explicitly. |
| + termsView.src = 'https://play.google.com/about/play-terms.html'; |
| + } |
| } |
| function setWindowBounds() { |
| @@ -665,7 +671,7 @@ chrome.app.runtime.onLaunched.addListener(function() { |
| // the ToS. |
| onAgree(); |
| } else { |
| - loadInitialTerms(); |
| + loadTerms(); |
|
hidehiko
2016/10/26 13:33:54
Note: Typically, this is the reload case. However,
|
| } |
| }; |