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

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: Reverted a few sign changes missed in last patchset Created 4 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/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..821822298510224a99609440fa7a932faba76eb3
--- /dev/null
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
@@ -0,0 +1,37 @@
+// 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 "content/public/browser/web_ui_data_source.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 *;");
Dan Beam 2016/01/13 23:45:22 ^ I don't really know how CSP works, maybe this sh
anthonyvd 2016/01/18 21:40:08 I based this code on some other web ui since it wa
+ 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