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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.h

Issue 6646051: Fix DCHECK, memory leak, and refactor PasswordStore to use CancelableRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responding to review comments. Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; 860 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE;
861 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; 861 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE;
862 virtual void ImportEnded() OVERRIDE; 862 virtual void ImportEnded() OVERRIDE;
863 863
864 private: 864 private:
865 base::WeakPtr<AutomationProvider> provider_; 865 base::WeakPtr<AutomationProvider> provider_;
866 scoped_ptr<IPC::Message> reply_message_; 866 scoped_ptr<IPC::Message> reply_message_;
867 }; 867 };
868 868
869 // Allows automation provider to wait for getting passwords to finish. 869 // Allows automation provider to wait for getting passwords to finish.
870 class AutomationProviderGetPasswordsObserver 870 class AutomationProviderGetPasswordsObserver : public PasswordStoreConsumer {
871 : public PasswordStoreConsumer {
872 public: 871 public:
873 AutomationProviderGetPasswordsObserver( 872 AutomationProviderGetPasswordsObserver(
874 AutomationProvider* provider, 873 AutomationProvider* provider,
875 IPC::Message* reply_message); 874 IPC::Message* reply_message);
876 virtual ~AutomationProviderGetPasswordsObserver(); 875 virtual ~AutomationProviderGetPasswordsObserver();
877 876
878 virtual void OnPasswordStoreRequestDone( 877 virtual void OnPasswordStoreRequestDone(
879 int handle, const std::vector<webkit_glue::PasswordForm*>& result); 878 PasswordStore::Handle handle,
879 const std::vector<webkit_glue::PasswordForm*>& result);
880 880
881 private: 881 private:
882 base::WeakPtr<AutomationProvider> provider_; 882 base::WeakPtr<AutomationProvider> provider_;
883 scoped_ptr<IPC::Message> reply_message_; 883 scoped_ptr<IPC::Message> reply_message_;
884 }; 884 };
885 885
886 // Allows the automation provider to wait for clearing browser data to finish. 886 // Allows the automation provider to wait for clearing browser data to finish.
887 class AutomationProviderBrowsingDataObserver 887 class AutomationProviderBrowsingDataObserver
888 : public BrowsingDataRemover::Observer { 888 : public BrowsingDataRemover::Observer {
889 public: 889 public:
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 // Sends the |reply_message_| to |automation_| indicating we're done. 1177 // Sends the |reply_message_| to |automation_| indicating we're done.
1178 void RunOnUIThread(); 1178 void RunOnUIThread();
1179 1179
1180 base::WeakPtr<AutomationProvider> automation_; 1180 base::WeakPtr<AutomationProvider> automation_;
1181 scoped_ptr<IPC::Message> reply_message_; 1181 scoped_ptr<IPC::Message> reply_message_;
1182 1182
1183 DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver); 1183 DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver);
1184 }; 1184 };
1185 1185
1186 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 1186 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698