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

Side by Side Diff: ios/chrome/browser/ui/webui/omaha_ui.cc

Issue 2617243002: Remove ScopedVector from ios/. (Closed)
Patch Set: rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "ios/chrome/browser/ui/webui/omaha_ui.h" 5 #include "ios/chrome/browser/ui/webui/omaha_ui.h"
6 6
7 #include "base/memory/ptr_util.h"
7 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
8 #include "base/values.h" 9 #include "base/values.h"
9 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
10 #include "ios/chrome/browser/chrome_url_constants.h" 11 #include "ios/chrome/browser/chrome_url_constants.h"
11 #include "ios/chrome/browser/omaha/omaha_service.h" 12 #include "ios/chrome/browser/omaha/omaha_service.h"
12 #include "ios/chrome/grit/ios_resources.h" 13 #include "ios/chrome/grit/ios_resources.h"
13 #include "ios/web/public/web_ui_ios_data_source.h" 14 #include "ios/web/public/web_ui_ios_data_source.h"
14 #include "ios/web/public/webui/web_ui_ios.h" 15 #include "ios/web/public/webui/web_ui_ios.h"
15 #include "ios/web/public/webui/web_ui_ios_message_handler.h" 16 #include "ios/web/public/webui/web_ui_ios_message_handler.h"
16 17
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void OmahaDOMHandler::OnDebugInformationAvailable( 75 void OmahaDOMHandler::OnDebugInformationAvailable(
75 base::DictionaryValue* debug_information) { 76 base::DictionaryValue* debug_information) {
76 web_ui()->CallJavascriptFunction("updateOmahaDebugInformation", 77 web_ui()->CallJavascriptFunction("updateOmahaDebugInformation",
77 *debug_information); 78 *debug_information);
78 } 79 }
79 80
80 } // namespace 81 } // namespace
81 82
82 // OmahaUI 83 // OmahaUI
83 OmahaUI::OmahaUI(web::WebUIIOS* web_ui) : WebUIIOSController(web_ui) { 84 OmahaUI::OmahaUI(web::WebUIIOS* web_ui) : WebUIIOSController(web_ui) {
84 web_ui->AddMessageHandler(new OmahaDOMHandler()); 85 web_ui->AddMessageHandler(base::MakeUnique<OmahaDOMHandler>());
85 86
86 // Set up the chrome://omaha/ source. 87 // Set up the chrome://omaha/ source.
87 ios::ChromeBrowserState* browser_state = 88 ios::ChromeBrowserState* browser_state =
88 ios::ChromeBrowserState::FromWebUIIOS(web_ui); 89 ios::ChromeBrowserState::FromWebUIIOS(web_ui);
89 web::WebUIIOSDataSource::Add(browser_state, CreateOmahaUIHTMLSource()); 90 web::WebUIIOSDataSource::Add(browser_state, CreateOmahaUIHTMLSource());
90 } 91 }
91 92
92 OmahaUI::~OmahaUI() {} 93 OmahaUI::~OmahaUI() {}
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc ('k') | ios/chrome/browser/ui/webui/physical_web_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698