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

Side by Side Diff: chrome/browser/automation/automation_provider_observers_chromeos.cc

Issue 10382197: Add PyAuto test for DeviceGuestModeEnabled policy (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Grammar/spelling fixes in comment. Created 8 years, 7 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 (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/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/automation/automation_provider.h" 8 #include "chrome/browser/automation/automation_provider.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/login/authentication_notification_details.h" 10 #include "chrome/browser/chromeos/login/authentication_notification_details.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 automation_->OnNetworkLibraryInit(); 46 automation_->OnNetworkLibraryInit();
47 delete this; 47 delete this;
48 } 48 }
49 } 49 }
50 50
51 LoginWebuiReadyObserver::LoginWebuiReadyObserver( 51 LoginWebuiReadyObserver::LoginWebuiReadyObserver(
52 AutomationProvider* automation) 52 AutomationProvider* automation)
53 : automation_(automation->AsWeakPtr()) { 53 : automation_(automation->AsWeakPtr()) {
54 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_WEBUI_READY, 54 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_WEBUI_READY,
55 content::NotificationService::AllSources()); 55 content::NotificationService::AllSources());
56 } 56 registrar_.Add(this, chrome::NOTIFICATION_ACCOUNT_PICKER_WEBUI_READY,
Nikita (slow) 2012/05/16 15:56:13 Should add these instead: NOTIFICATION_LOGIN_USER_
bartfab (slow) 2012/05/16 18:07:10 Thanks. I had seen that code but did not realize t
57 57 content::NotificationService::AllSources());
58 LoginWebuiReadyObserver::~LoginWebuiReadyObserver() {
59 } 58 }
60 59
61 void LoginWebuiReadyObserver::Observe( 60 void LoginWebuiReadyObserver::Observe(
62 int type, 61 int type,
63 const content::NotificationSource& source, 62 const content::NotificationSource& source,
64 const content::NotificationDetails& details) { 63 const content::NotificationDetails& details) {
65 DCHECK(type == chrome::NOTIFICATION_LOGIN_WEBUI_READY); 64 DCHECK(type == chrome::NOTIFICATION_LOGIN_WEBUI_READY ||
65 type == chrome::NOTIFICATION_ACCOUNT_PICKER_WEBUI_READY);
66 if (automation_) 66 if (automation_)
67 automation_->OnLoginWebuiReady(); 67 automation_->OnLoginWebuiReady();
68 delete this; 68 delete this;
69 } 69 }
70 70
71 LoginObserver::LoginObserver(chromeos::ExistingUserController* controller, 71 LoginObserver::LoginObserver(chromeos::ExistingUserController* controller,
72 AutomationProvider* automation, 72 AutomationProvider* automation,
73 IPC::Message* reply_message) 73 IPC::Message* reply_message)
74 : controller_(controller), 74 : controller_(controller),
75 automation_(automation->AsWeakPtr()), 75 automation_(automation->AsWeakPtr()),
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 453
454 void PhotoCaptureObserver::LocalStateChanged( 454 void PhotoCaptureObserver::LocalStateChanged(
455 chromeos::UserManager* user_manager) { 455 chromeos::UserManager* user_manager) {
456 user_manager->RemoveObserver(this); 456 user_manager->RemoveObserver(this);
457 if (automation_) { 457 if (automation_) {
458 AutomationJSONReply( 458 AutomationJSONReply(
459 automation_, reply_message_.release()).SendSuccess(NULL); 459 automation_, reply_message_.release()).SendSuccess(NULL);
460 } 460 }
461 delete this; 461 delete this;
462 } 462 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698