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

Unified Diff: chrome/browser/ui/webui/signin/sync_confirmation_ui.cc

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some tests. Created 5 years 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/ui/webui/signin/sync_confirmation_ui.cc
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..486f61a3fb5b9306e9c90c7b48172fb8a7ab67e6
--- /dev/null
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h"
+#include "chrome/grit/generated_resources.h"
+#include "content/public/browser/web_ui.h"
+#include "grit/browser_resources.h"
+
+SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui)
+ : WebDialogUI(web_ui) {
+ Profile* profile = Profile::FromWebUI(web_ui);
+ content::WebUIDataSource* source =
+ content::WebUIDataSource::Create("sync-confirmation");
+ source->SetJsonPath("strings.js");
+ source->OverrideContentSecurityPolicyFrameSrc("frame-src chrome-extension:;");
+ source->OverrideContentSecurityPolicyObjectSrc("object-src *;");
+ source->SetDefaultResource(IDR_SYNC_CONFIRMATION_HTML);
+ source->AddResourcePath("sync-confirmation.css", IDR_SYNC_CONFIRMATION_CSS);
+ source->AddResourcePath("sync-confirmation.js", IDR_SYNC_CONFIRMATION_JS);
+
+ source->AddLocalizedString("syncConfirmationTitle",
+ IDS_SYNC_CONFIRMATION_TITLE);
+ source->AddLocalizedString("syncConfirmationBody",
+ IDS_SYNC_CONFIRMATION_BODY);
+ source->AddLocalizedString("syncConfirmationConfirmLabel",
+ IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL);
+ source->AddLocalizedString("syncConfirmationUndoLabel",
+ IDS_SYNC_CONFIRMATION_UNDO_BUTTON_LABEL);
+
+ content::WebUIDataSource::Add(profile, source);
+ web_ui->AddMessageHandler(new SyncConfirmationHandler);
+}

Powered by Google App Engine
This is Rietveld 408576698