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

Side by Side Diff: chrome/common/extensions/manifest_url_handler.cc

Issue 208633002: [Code cleanup]Remove webui virtual keyboard code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | ui/keyboard/keyboard.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/common/extensions/manifest_url_handler.h" 5 #include "chrome/common/extensions/manifest_url_handler.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 std::string val; 285 std::string val;
286 // Restrict override pages to a list of supported URLs. 286 // Restrict override pages to a list of supported URLs.
287 bool is_override = (page != chrome::kChromeUINewTabHost && 287 bool is_override = (page != chrome::kChromeUINewTabHost &&
288 page != chrome::kChromeUIBookmarksHost && 288 page != chrome::kChromeUIBookmarksHost &&
289 page != chrome::kChromeUIHistoryHost); 289 page != chrome::kChromeUIHistoryHost);
290 #if defined(OS_CHROMEOS) 290 #if defined(OS_CHROMEOS)
291 is_override = (is_override && 291 is_override = (is_override &&
292 page != chrome::kChromeUIActivationMessageHost); 292 page != chrome::kChromeUIActivationMessageHost);
293 #endif 293 #endif
294 #if defined(OS_CHROMEOS) 294 #if defined(OS_CHROMEOS)
295 is_override = (is_override && page != keyboard::kKeyboardWebUIHost); 295 is_override = (is_override && page != keyboard::kKeyboardHost);
296 #endif 296 #endif
297 297
298 if (is_override || !iter.value().GetAsString(&val)) { 298 if (is_override || !iter.value().GetAsString(&val)) {
299 *error = base::ASCIIToUTF16(errors::kInvalidChromeURLOverrides); 299 *error = base::ASCIIToUTF16(errors::kInvalidChromeURLOverrides);
300 return false; 300 return false;
301 } 301 }
302 // Replace the entry with a fully qualified chrome-extension:// URL. 302 // Replace the entry with a fully qualified chrome-extension:// URL.
303 url_overrides->chrome_url_overrides_[page] = extension->GetResourceURL(val); 303 url_overrides->chrome_url_overrides_[page] = extension->GetResourceURL(val);
304 304
305 // For component extensions, add override URL to extent patterns. 305 // For component extensions, add override URL to extent patterns.
(...skipping 19 matching lines...) Expand all
325 extension->SetManifestData(keys::kChromeURLOverrides, 325 extension->SetManifestData(keys::kChromeURLOverrides,
326 url_overrides.release()); 326 url_overrides.release());
327 return true; 327 return true;
328 } 328 }
329 329
330 const std::vector<std::string> URLOverridesHandler::Keys() const { 330 const std::vector<std::string> URLOverridesHandler::Keys() const {
331 return SingleKey(keys::kChromeURLOverrides); 331 return SingleKey(keys::kChromeURLOverrides);
332 } 332 }
333 333
334 } // namespace extensions 334 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | ui/keyboard/keyboard.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698