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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/content_condition.cc

Issue 2853023002: [Extensions Bindings] Add native declarativeContent verification (Closed)
Patch Set: lazyboy's Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extensions/api/declarative_content/content_condition.h" 5 #include "chrome/browser/extensions/api/declarative_content/content_condition.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/extensions/api/declarative_content/content_constants.h" 12 #include "extensions/common/api/declarative/declarative_constants.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 namespace { 16 namespace {
17 17
18 // TODO(jyasskin): improve error messaging to give more meaningful messages 18 // TODO(jyasskin): improve error messaging to give more meaningful messages
19 // to the extension developer. 19 // to the extension developer.
20 // Error messages: 20 // Error messages:
21 const char kExpectedDictionary[] = "A condition has to be a dictionary."; 21 const char kExpectedDictionary[] = "A condition has to be a dictionary.";
22 const char kConditionWithoutInstanceType[] = "A condition had no instanceType"; 22 const char kConditionWithoutInstanceType[] = "A condition had no instanceType";
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 if (!error->empty()) 75 if (!error->empty())
76 return std::unique_ptr<ContentCondition>(); 76 return std::unique_ptr<ContentCondition>();
77 } 77 }
78 78
79 return std::unique_ptr<ContentCondition>( 79 return std::unique_ptr<ContentCondition>(
80 new ContentCondition(std::move(predicates))); 80 new ContentCondition(std::move(predicates)));
81 } 81 }
82 82
83 } // namespace extensions 83 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698