| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/snippets_internals_ui.h" | 5 #include "chrome/browser/ui/webui/snippets_internals_ui.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/webui/snippets_internals_message_handler.h" | 8 #include "chrome/browser/ui/webui/snippets_internals_message_handler.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome/grit/browser_resources.h" | 10 #include "chrome/grit/browser_resources.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 return source; | 24 return source; |
| 25 } | 25 } |
| 26 | 26 |
| 27 } // namespace | 27 } // namespace |
| 28 | 28 |
| 29 SnippetsInternalsUI::SnippetsInternalsUI(content::WebUI* web_ui) | 29 SnippetsInternalsUI::SnippetsInternalsUI(content::WebUI* web_ui) |
| 30 : WebUIController(web_ui) { | 30 : WebUIController(web_ui) { |
| 31 Profile* profile = Profile::FromWebUI(web_ui); | 31 Profile* profile = Profile::FromWebUI(web_ui); |
| 32 content::WebUIDataSource::Add(profile, CreateSnippetsInternalsHTMLSource()); | 32 content::WebUIDataSource::Add(profile, CreateSnippetsInternalsHTMLSource()); |
| 33 | 33 |
| 34 web_ui->AddMessageHandler(new SnippetsInternalsMessageHandler); | 34 web_ui->AddMessageHandler( |
| 35 new SnippetsInternalsMessageHandler(profile->GetPrefs())); |
| 35 } | 36 } |
| 36 | 37 |
| 37 SnippetsInternalsUI::~SnippetsInternalsUI() {} | 38 SnippetsInternalsUI::~SnippetsInternalsUI() {} |
| OLD | NEW |