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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Filter handler of chrome://oobe data source. 73 // Filter handler of chrome://oobe data source.
74 bool HandleRequestCallback( 74 bool HandleRequestCallback(
75 const std::string& path, 75 const std::string& path,
76 const content::WebUIDataSource::GotDataCallback& callback) { 76 const content::WebUIDataSource::GotDataCallback& callback) {
77 if (UserManager::Get()->IsUserLoggedIn() && 77 if (UserManager::Get()->IsUserLoggedIn() &&
78 !UserManager::Get()->IsLoggedInAsStub() && 78 !UserManager::Get()->IsLoggedInAsStub() &&
79 !ScreenLocker::default_screen_locker()) { 79 !ScreenLocker::default_screen_locker()) {
80 scoped_refptr<base::RefCountedBytes> empty_bytes = 80 scoped_refptr<base::RefCountedBytes> empty_bytes =
81 new base::RefCountedBytes(); 81 new base::RefCountedBytes();
82 callback.Run(empty_bytes); 82 callback.Run(empty_bytes.get());
83 return true; 83 return true;
84 } 84 }
85 85
86 return false; 86 return false;
87 } 87 }
88 88
89 // Creates a WebUIDataSource for chrome://oobe 89 // Creates a WebUIDataSource for chrome://oobe
90 content::WebUIDataSource* CreateOobeUIDataSource( 90 content::WebUIDataSource* CreateOobeUIDataSource(
91 const base::DictionaryValue& localized_strings) { 91 const base::DictionaryValue& localized_strings) {
92 content::WebUIDataSource* source = 92 content::WebUIDataSource* source =
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 void OobeUI::OnCurrentScreenChanged(const std::string& screen) { 419 void OobeUI::OnCurrentScreenChanged(const std::string& screen) {
420 if (screen_ids_.count(screen)) { 420 if (screen_ids_.count(screen)) {
421 current_screen_ = screen_ids_[screen]; 421 current_screen_ = screen_ids_[screen];
422 } else { 422 } else {
423 NOTREACHED() << "Screen should be registered in InitializeScreenMaps()"; 423 NOTREACHED() << "Screen should be registered in InitializeScreenMaps()";
424 current_screen_ = SCREEN_UNKNOWN; 424 current_screen_ = SCREEN_UNKNOWN;
425 } 425 }
426 } 426 }
427 427
428 } // namespace chromeos 428 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/certificate_viewer_webui.cc ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698