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

Side by Side Diff: chrome/browser/extensions/menu_manager.h

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Trying one last time get past Base Files Missing. Created 7 years, 4 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 (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 CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 bool Contains(Context context) const { 104 bool Contains(Context context) const {
105 return (value_ & context) > 0; 105 return (value_ & context) > 0;
106 } 106 }
107 107
108 void Add(Context context) { 108 void Add(Context context) {
109 value_ |= context; 109 value_ |= context;
110 } 110 }
111 111
112 scoped_ptr<base::Value> ToValue() const { 112 scoped_ptr<base::Value> ToValue() const {
113 return scoped_ptr<base::Value>(base::Value::CreateIntegerValue(value_)); 113 return scoped_ptr<base::Value>(new base::FundamentalValue((int)value_));
114 } 114 }
115 115
116 bool Populate(const base::Value& value) { 116 bool Populate(const base::Value& value) {
117 int int_value; 117 int int_value;
118 if (!value.GetAsInteger(&int_value) || int_value < 0) 118 if (!value.GetAsInteger(&int_value) || int_value < 0)
119 return false; 119 return false;
120 value_ = int_value; 120 value_ = int_value;
121 return true; 121 return true;
122 } 122 }
123 123
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 ExtensionIconManager icon_manager_; 349 ExtensionIconManager icon_manager_;
350 350
351 Profile* profile_; 351 Profile* profile_;
352 352
353 DISALLOW_COPY_AND_ASSIGN(MenuManager); 353 DISALLOW_COPY_AND_ASSIGN(MenuManager);
354 }; 354 };
355 355
356 } // namespace extensions 356 } // namespace extensions
357 357
358 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 358 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698