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

Side by Side Diff: chrome/browser/signin/screenlock_bridge.cc

Issue 668213003: Reauthenticate the user before launching Smart Lock setup app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes + git cl format Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 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 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/signin/screenlock_bridge.h" 5 #include "chrome/browser/signin/screenlock_bridge.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "chrome/browser/profiles/profile_window.h" 9 #include "chrome/browser/profiles/profile_window.h"
10 #include "chrome/browser/signin/signin_manager_factory.h" 10 #include "chrome/browser/signin/signin_manager_factory.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 : autoshow_tooltip_(false), 55 : autoshow_tooltip_(false),
56 hardlock_on_click_(false) { 56 hardlock_on_click_(false) {
57 } 57 }
58 58
59 ScreenlockBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() {} 59 ScreenlockBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() {}
60 60
61 scoped_ptr<base::DictionaryValue> 61 scoped_ptr<base::DictionaryValue>
62 ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const { 62 ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const {
63 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue()); 63 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
64 std::string icon_id = GetIdForIcon(icon_); 64 std::string icon_id = GetIdForIcon(icon_);
65 if (icon_id.empty())
66 return result.Pass();
67
68 result->SetString("id", icon_id); 65 result->SetString("id", icon_id);
69 66
70 if (!tooltip_.empty()) { 67 if (!tooltip_.empty()) {
71 base::DictionaryValue* tooltip_options = new base::DictionaryValue(); 68 base::DictionaryValue* tooltip_options = new base::DictionaryValue();
72 tooltip_options->SetString("text", tooltip_); 69 tooltip_options->SetString("text", tooltip_);
73 tooltip_options->SetBoolean("autoshow", autoshow_tooltip_); 70 tooltip_options->SetBoolean("autoshow", autoshow_tooltip_);
74 result->Set("tooltip", tooltip_options); 71 result->Set("tooltip", tooltip_options);
75 } 72 }
76 73
77 if (!aria_label_.empty()) 74 if (!aria_label_.empty())
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 lock_handler_->Unlock(GetAuthenticatedUserEmail(profile)); 151 lock_handler_->Unlock(GetAuthenticatedUserEmail(profile));
155 } 152 }
156 153
157 void ScreenlockBridge::AddObserver(Observer* observer) { 154 void ScreenlockBridge::AddObserver(Observer* observer) {
158 observers_.AddObserver(observer); 155 observers_.AddObserver(observer);
159 } 156 }
160 157
161 void ScreenlockBridge::RemoveObserver(Observer* observer) { 158 void ScreenlockBridge::RemoveObserver(Observer* observer) {
162 observers_.RemoveObserver(observer); 159 observers_.RemoveObserver(observer);
163 } 160 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_service_regular.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