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

Side by Side Diff: chrome/browser/ui/webui/signin/signin_ui.cc

Issue 141363006: Proof of concept of ignoring x-frame-options for sign-in webui. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix crash Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_ui.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/signin/signin_ui.h"
6
7 #include <string>
8
9 #include "base/bind.h"
10 #include "base/memory/ref_counted_memory.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string_util.h"
13 #include "base/strings/stringprintf.h"
14 #include "chrome/browser/net/chrome_url_request_context.h"
15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/common/url_constants.h"
17 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/web_contents.h"
19 #include "content/public/browser/web_ui.h"
20 #include "content/public/browser/web_ui_data_source.h"
21 #include "grit/browser_resources.h"
22 #include "net/url_request/url_fetcher.h"
23 #include "net/url_request/url_fetcher_delegate.h"
24 #include "net/url_request/url_request_context_getter.h"
25 #include "ui/base/resource/resource_bundle.h"
26
27 using content::BrowserThread;
28 using content::WebContents;
29
30 namespace {
31
32 content::WebUIDataSource* CreateWebUIDataSource() {
33 content::WebUIDataSource* source =
34 content::WebUIDataSource::Create(chrome::kChromeSigninHost);
35 source->DisableContentSecurityPolicy(); // So we can add iframe.
36 source->SetUseJsonJSFormatV2();
37 source->SetJsonPath("strings.js");
38
39 source->SetDefaultResource(IDR_SIGNIN_HTML);
40 return source;
41 };
42
43 } // empty namespace
44
45 SigninUI::SigninUI(content::WebUI* web_ui) : WebUIController(web_ui) {
46 Profile* profile = Profile::FromWebUI(web_ui);
47 content::WebUIDataSource::Add(profile, CreateWebUIDataSource());
48 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_ui.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698