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

Side by Side Diff: chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/manifest_handlers/ui_overrides_handler.h" 5 #include "chrome/common/extensions/manifest_handlers/ui_overrides_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 return permissions; 45 return permissions;
46 } 46 }
47 47
48 bool FromValue(const base::Value* value) override { 48 bool FromValue(const base::Value* value) override {
49 return value && value->GetAsBoolean(&override_bookmarks_ui_permission_); 49 return value && value->GetAsBoolean(&override_bookmarks_ui_permission_);
50 } 50 }
51 51
52 std::unique_ptr<base::Value> ToValue() const override { 52 std::unique_ptr<base::Value> ToValue() const override {
53 return std::unique_ptr<base::Value>( 53 return std::unique_ptr<base::Value>(
54 new base::FundamentalValue(override_bookmarks_ui_permission_)); 54 new base::Value(override_bookmarks_ui_permission_));
55 } 55 }
56 56
57 ManifestPermission* Diff(const ManifestPermission* rhs) const override { 57 ManifestPermission* Diff(const ManifestPermission* rhs) const override {
58 const ManifestPermissionImpl* other = 58 const ManifestPermissionImpl* other =
59 static_cast<const ManifestPermissionImpl*>(rhs); 59 static_cast<const ManifestPermissionImpl*>(rhs);
60 60
61 return std::unique_ptr<ManifestPermissionImpl>( 61 return std::unique_ptr<ManifestPermissionImpl>(
62 new ManifestPermissionImpl( 62 new ManifestPermissionImpl(
63 override_bookmarks_ui_permission_ && 63 override_bookmarks_ui_permission_ &&
64 !other->override_bookmarks_ui_permission_)) 64 !other->override_bookmarks_ui_permission_))
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 const UIOverrides* data = UIOverrides::Get(extension); 174 const UIOverrides* data = UIOverrides::Get(extension);
175 if (data) 175 if (data)
176 return data->manifest_permission->Clone(); 176 return data->manifest_permission->Clone();
177 return NULL; 177 return NULL;
178 } 178 }
179 const std::vector<std::string> UIOverridesHandler::Keys() const { 179 const std::vector<std::string> UIOverridesHandler::Keys() const {
180 return SingleKey(manifest_keys::kUIOverride); 180 return SingleKey(manifest_keys::kUIOverride);
181 } 181 }
182 182
183 } // namespace extensions 183 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/welcome_win10_handler.cc ('k') | chrome/common/extensions/manifest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698