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

Unified Diff: base/supports_user_data.h

Issue 10987100: Switch AutofillManager to be UserData on WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix external delegate Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_external_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/supports_user_data.h
diff --git a/base/supports_user_data.h b/base/supports_user_data.h
index 4c7cdcad26202bb5577f31013a01f1a0587afa36..77367553daf5b405d5fffa138614d6a64b0234f0 100644
--- a/base/supports_user_data.h
+++ b/base/supports_user_data.h
@@ -62,9 +62,9 @@ template <typename T>
class UserDataAdapter : public base::SupportsUserData::Data {
public:
static T* Get(SupportsUserData* supports_user_data, const char* key) {
- UserDataAdapter* data =
+ UserDataAdapter* data =
static_cast<UserDataAdapter*>(supports_user_data->GetUserData(key));
- return static_cast<T*>(data->object_.get());
+ return data ? static_cast<T*>(data->object_.get()) : NULL;
}
UserDataAdapter(T* object) : object_(object) {}
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_external_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698