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

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

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/easy_unlock_app_manager.h" 5 #include "chrome/browser/signin/easy_unlock_app_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h" 9 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h"
10 #include "chrome/browser/extensions/component_loader.h" 10 #include "chrome/browser/extensions/component_loader.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return false; 155 return false;
156 156
157 extensions::api::easy_unlock_private::UserInfo info; 157 extensions::api::easy_unlock_private::UserInfo info;
158 info.user_id = user_id; 158 info.user_id = user_id;
159 info.logged_in = is_logged_in; 159 info.logged_in = is_logged_in;
160 info.data_ready = data_ready; 160 info.data_ready = data_ready;
161 161
162 scoped_ptr<base::ListValue> args(new base::ListValue()); 162 scoped_ptr<base::ListValue> args(new base::ListValue());
163 args->Append(info.ToValue().release()); 163 args->Append(info.ToValue().release());
164 164
165 scoped_ptr<extensions::Event> event( 165 scoped_ptr<extensions::Event> event(new extensions::Event(
166 new extensions::Event(event_name, args.Pass())); 166 extensions::events::UNKNOWN, event_name, args.Pass()));
167 167
168 event_router->DispatchEventToExtension(app_id_, event.Pass()); 168 event_router->DispatchEventToExtension(app_id_, event.Pass());
169 return true; 169 return true;
170 } 170 }
171 171
172 bool EasyUnlockAppManagerImpl::SendAuthAttemptEvent() { 172 bool EasyUnlockAppManagerImpl::SendAuthAttemptEvent() {
173 ExtensionService* extension_service = extension_system_->extension_service(); 173 ExtensionService* extension_service = extension_system_->extension_service();
174 if (!extension_service) 174 if (!extension_service)
175 return false; 175 return false;
176 176
(...skipping 11 matching lines...) Expand all
188 } 188 }
189 189
190 // static 190 // static
191 scoped_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create( 191 scoped_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create(
192 extensions::ExtensionSystem* extension_system, 192 extensions::ExtensionSystem* extension_system,
193 int manifest_id, 193 int manifest_id,
194 const base::FilePath& app_path) { 194 const base::FilePath& app_path) {
195 return scoped_ptr<EasyUnlockAppManager>( 195 return scoped_ptr<EasyUnlockAppManager>(
196 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path)); 196 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path));
197 } 197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698