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

Unified Diff: chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.h

Issue 2561023002: arc: ARC loading progress should not be shown when started from OOBE. (Closed)
Patch Set: rebased + comments updated Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.h
diff --git a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_negotiator.h b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.h
similarity index 55%
copy from chrome/browser/chromeos/arc/optin/arc_terms_of_service_negotiator.h
copy to chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.h
index 41871dde0650cd555c942837cb825cf9b71e3246..10d8a0dc0b8b1690fda14f686573f6854ed03f52 100644
--- a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_negotiator.h
+++ b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_NEGOTIATOR_H_
-#define CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_NEGOTIATOR_H_
+#ifndef CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_DEFAULT_NEGOTIATOR_H_
+#define CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_DEFAULT_NEGOTIATOR_H_
#include <memory>
#include <string>
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "chrome/browser/chromeos/arc/arc_support_host.h"
#include "chrome/browser/chromeos/arc/optin/arc_optin_preference_handler_observer.h"
+#include "chrome/browser/chromeos/arc/optin/arc_terms_of_service_negotiator.h"
class PrefService;
@@ -19,22 +20,15 @@ namespace arc {
class ArcOptInPreferenceHandler;
-// Handles the Terms-of-service agreement user action.
-class ArcTermsOfServiceNegotiator : public ArcSupportHost::Observer,
- public ArcOptInPreferenceHandlerObserver {
+// Handles the Terms-of-service agreement user action via default OptIn UI.
+class ArcTermsOfServiceDefaultNegotiator
+ : public ArcTermsOfServiceNegotiator,
+ public ArcSupportHost::Observer,
+ public ArcOptInPreferenceHandlerObserver {
public:
- ArcTermsOfServiceNegotiator(PrefService* pref_service,
- ArcSupportHost* support_host);
- ~ArcTermsOfServiceNegotiator() override;
-
- // Shows "Terms of service" page on ARC support Chrome App. Invokes the
- // |callback| asynchronously with "|agreed| = true" if user agrees it.
- // Otherwise (e.g., user clicks "Cancel" or closes the window), invokes
- // |callback| with |agreed| = false.
- // Deleting this instance cancels the operation, so |callback| will never
- // be invoked then.
- using NegotiationCallback = base::Callback<void(bool accepted)>;
- void StartNegotiation(const NegotiationCallback& callback);
+ ArcTermsOfServiceDefaultNegotiator(PrefService* pref_service,
+ ArcSupportHost* support_host);
+ ~ArcTermsOfServiceDefaultNegotiator() override;
private:
// ArcSupportHost::Observer:
@@ -51,16 +45,19 @@ class ArcTermsOfServiceNegotiator : public ArcSupportHost::Observer,
void OnBackupAndRestoreModeChanged(bool enabled, bool managed) override;
void OnLocationServicesModeChanged(bool enabled, bool managed) override;
+ // ArcTermsOfServiceNegotiator:
+ // Shows "Terms of service" page on ARC support Chrome App.
+ void StartNegotiationImpl() override;
+
PrefService* const pref_service_;
// Owned by ArcSessionManager.
ArcSupportHost* const support_host_;
- NegotiationCallback pending_callback_;
std::unique_ptr<ArcOptInPreferenceHandler> preference_handler_;
- DISALLOW_COPY_AND_ASSIGN(ArcTermsOfServiceNegotiator);
+ DISALLOW_COPY_AND_ASSIGN(ArcTermsOfServiceDefaultNegotiator);
};
} // namespace arc
-#endif // CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_NEGOTIATOR_H_
+#endif // CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_DEFAULT_NEGOTIATOR_H_

Powered by Google App Engine
This is Rietveld 408576698