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

Side by Side Diff: components/webdata/common/web_data_results.h

Issue 1020283002: Remove WDObjectResult (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ 5 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_
6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ 6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "components/webdata/common/webdata_export.h" 10 #include "components/webdata/common/webdata_export.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return value_; 107 return value_;
108 } 108 }
109 109
110 private: 110 private:
111 T value_; 111 T value_;
112 DestroyCallback callback_; 112 DestroyCallback callback_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(WDDestroyableResult); 114 DISALLOW_COPY_AND_ASSIGN(WDDestroyableResult);
115 }; 115 };
116 116
117 template <class T> class WDObjectResult : public WDTypedResult {
118 public:
119 explicit WDObjectResult(WDResultType type)
120 : WDTypedResult(type) {
121 }
122
123 T* GetValue() const {
124 return &value_;
125 }
126
127 private:
128 // mutable to keep GetValue() const.
129 mutable T value_;
130 DISALLOW_COPY_AND_ASSIGN(WDObjectResult);
131 };
132
133 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_ 117 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698