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

Side by Side Diff: extensions/common/features/complex_feature.cc

Issue 224163002: Move core features code to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move tests Created 6 years, 8 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) 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/common/extensions/features/complex_feature.h" 5 #include "extensions/common/features/complex_feature.h"
6 6
7 namespace extensions { 7 namespace extensions {
8 8
9 ComplexFeature::ComplexFeature(scoped_ptr<FeatureList> features) { 9 ComplexFeature::ComplexFeature(scoped_ptr<FeatureList> features) {
10 DCHECK_GT(features->size(), 0UL); 10 DCHECK_GT(features->size(), 0UL);
11 features_.swap(*features); 11 features_.swap(*features);
12 12
13 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) 13 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
14 // Verify GetContexts, IsInternal, & IsBlockedInServiceWorker are consistent 14 // Verify GetContexts, IsInternal, & IsBlockedInServiceWorker are consistent
15 // across all features. 15 // across all features.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 Context context) const { 114 Context context) const {
115 if (result == IS_AVAILABLE) 115 if (result == IS_AVAILABLE)
116 return std::string(); 116 return std::string();
117 117
118 // TODO(justinlin): Form some kind of combined availabilities/messages from 118 // TODO(justinlin): Form some kind of combined availabilities/messages from
119 // SimpleFeatures. 119 // SimpleFeatures.
120 return features_[0]->GetAvailabilityMessage(result, type, url, context); 120 return features_[0]->GetAvailabilityMessage(result, type, url, context);
121 } 121 }
122 122
123 } // namespace extensions 123 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698