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

Side by Side Diff: chrome/browser/extensions/extension_action_test_util.cc

Issue 1739183003: Make extensions::DictionaryBuilder and extensions::ListValue unmovable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extension_action_test_util.h" 5 #include "chrome/browser/extensions/extension_action_test_util.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/extensions/extension_action.h" 9 #include "chrome/browser/extensions/extension_action.h"
10 #include "chrome/browser/extensions/extension_action_manager.h" 10 #include "chrome/browser/extensions/extension_action_manager.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 break; 143 break;
144 case PAGE_ACTION: 144 case PAGE_ACTION:
145 action_key = manifest_keys::kPageAction; 145 action_key = manifest_keys::kPageAction;
146 break; 146 break;
147 case BROWSER_ACTION: 147 case BROWSER_ACTION:
148 action_key = manifest_keys::kBrowserAction; 148 action_key = manifest_keys::kBrowserAction;
149 break; 149 break;
150 } 150 }
151 151
152 if (action_key) 152 if (action_key)
153 manifest.Set(action_key, DictionaryBuilder()); 153 manifest.Set(action_key, DictionaryBuilder().Build());
154 154
155 return ExtensionBuilder() 155 return ExtensionBuilder()
156 .SetManifest(std::move(manifest)) 156 .SetManifest(manifest.Build())
157 .SetID(crx_file::id_util::GenerateId(name)) 157 .SetID(crx_file::id_util::GenerateId(name))
158 .SetLocation(location) 158 .SetLocation(location)
159 .Build(); 159 .Build();
160 } 160 }
161 161
162 ToolbarActionsModel* CreateToolbarModelForProfile(Profile* profile) { 162 ToolbarActionsModel* CreateToolbarModelForProfile(Profile* profile) {
163 return CreateToolbarModelImpl(profile, true); 163 return CreateToolbarModelImpl(profile, true);
164 } 164 }
165 165
166 ToolbarActionsModel* CreateToolbarModelForProfileWithoutWaitingForReady( 166 ToolbarActionsModel* CreateToolbarModelForProfileWithoutWaitingForReady(
167 Profile* profile) { 167 Profile* profile) {
168 return CreateToolbarModelImpl(profile, false); 168 return CreateToolbarModelImpl(profile, false);
169 } 169 }
170 170
171 } // namespace extension_action_test_util 171 } // namespace extension_action_test_util
172 } // namespace extensions 172 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698