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

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

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool Contains(Context context) const { 138 bool Contains(Context context) const {
139 return (value_ & context) > 0; 139 return (value_ & context) > 0;
140 } 140 }
141 141
142 void Add(Context context) { 142 void Add(Context context) {
143 value_ |= context; 143 value_ |= context;
144 } 144 }
145 145
146 std::unique_ptr<base::Value> ToValue() const { 146 std::unique_ptr<base::Value> ToValue() const {
147 return std::unique_ptr<base::Value>( 147 return std::unique_ptr<base::Value>(
148 new base::FundamentalValue(static_cast<int>(value_))); 148 new base::Value(static_cast<int>(value_)));
149 } 149 }
150 150
151 bool Populate(const base::Value& value) { 151 bool Populate(const base::Value& value) {
152 int int_value; 152 int int_value;
153 if (!value.GetAsInteger(&int_value) || int_value < 0) 153 if (!value.GetAsInteger(&int_value) || int_value < 0)
154 return false; 154 return false;
155 value_ = int_value; 155 value_ = int_value;
156 return true; 156 return true;
157 } 157 }
158 158
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 // Owned by ExtensionSystem. 412 // Owned by ExtensionSystem.
413 StateStore* store_; 413 StateStore* store_;
414 414
415 DISALLOW_COPY_AND_ASSIGN(MenuManager); 415 DISALLOW_COPY_AND_ASSIGN(MenuManager);
416 }; 416 };
417 417
418 } // namespace extensions 418 } // namespace extensions
419 419
420 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 420 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/launch_util.cc ('k') | chrome/browser/extensions/scripting_permissions_modifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698