Index: chrome/browser/chromeos/enrollment_dialog_view.h |
diff --git a/chrome/browser/chromeos/enrollment_dialog_view.h b/chrome/browser/chromeos/enrollment_dialog_view.h |
index a3cd8f0a40f11533f9d7b593324b372ef55050fe..b855cac021e94c08859344673954415773862124 100644 |
--- a/chrome/browser/chromeos/enrollment_dialog_view.h |
+++ b/chrome/browser/chromeos/enrollment_dialog_view.h |
@@ -6,14 +6,31 @@ |
#define CHROME_BROWSER_CHROMEOS_ENROLLMENT_DIALOG_VIEW_H_ |
#include <string> |
+#include <vector> |
+#include "base/callback_forward.h" |
#include "ui/gfx/native_widget_types.h" |
class Profile; |
namespace chromeos { |
-class EnrollmentDelegate; |
+// An interface that can be used to handle certificate enrollment URIs when |
+// encountered. Also used by unit tests to avoid opening browser windows |
+// when testing. |
+class EnrollmentDelegate { |
+ public: |
+ EnrollmentDelegate() {} |
+ virtual ~EnrollmentDelegate() {} |
+ |
+ // Implemented to handle a given certificate enrollment URI. Returns false |
+ // if the enrollment URI doesn't use a scheme that we can handle. |
+ // |post_action| is called when enrollment completes. |
+ virtual bool Enroll(const std::vector<std::string>& uri_list, |
+ const base::Closure& post_action) = 0; |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(EnrollmentDelegate); |
+}; |
EnrollmentDelegate* CreateEnrollmentDelegate(gfx::NativeWindow owning_window, |
const std::string& network_name, |