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

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

Issue 6672065: Support touch icon in FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some style issues Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_function_dispatcher.h" 5 #include "chrome/browser/extensions/extension_function_dispatcher.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 // Notify the ExtensionProcessManager that the view was created. 395 // Notify the ExtensionProcessManager that the view was created.
396 ExtensionProcessManager* epm = profile()->GetExtensionProcessManager(); 396 ExtensionProcessManager* epm = profile()->GetExtensionProcessManager();
397 epm->RegisterExtensionProcess(extension_id(), 397 epm->RegisterExtensionProcess(extension_id(),
398 render_view_host->process()->id()); 398 render_view_host->process()->id());
399 399
400 // If the extension has permission to load chrome://favicon/ resources we need 400 // If the extension has permission to load chrome://favicon/ resources we need
401 // to make sure that the FaviconSource is registered with the 401 // to make sure that the FaviconSource is registered with the
402 // ChromeURLDataManager. 402 // ChromeURLDataManager.
403 if (extension->HasHostPermission(GURL(chrome::kChromeUIFaviconURL))) { 403 if (extension->HasHostPermission(GURL(chrome::kChromeUIFaviconURL))) {
404 FaviconSource* favicon_source = new FaviconSource(profile_); 404 FaviconSource* favicon_source = new FaviconSource(profile_,
405 chrome::kChromeUIFaviconURL);
405 profile_->GetChromeURLDataManager()->AddDataSource(favicon_source); 406 profile_->GetChromeURLDataManager()->AddDataSource(favicon_source);
406 } 407 }
407 408
408 // Update the extension permissions. Doing this each time we create an EFD 409 // Update the extension permissions. Doing this each time we create an EFD
409 // ensures that new processes are informed of permissions for newly installed 410 // ensures that new processes are informed of permissions for newly installed
410 // extensions. 411 // extensions.
411 render_view_host->Send(new ViewMsg_Extension_SetAPIPermissions( 412 render_view_host->Send(new ViewMsg_Extension_SetAPIPermissions(
412 extension->id(), extension->api_permissions())); 413 extension->id(), extension->api_permissions()));
413 render_view_host->Send(new ViewMsg_Extension_SetHostPermissions( 414 render_view_host->Send(new ViewMsg_Extension_SetHostPermissions(
414 extension->url(), extension->host_permissions())); 415 extension->url(), extension->host_permissions()));
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 NOTREACHED(); 509 NOTREACHED();
509 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_EFD")); 510 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_EFD"));
510 base::KillProcess(render_view_host_->process()->GetHandle(), 511 base::KillProcess(render_view_host_->process()->GetHandle(),
511 ResultCodes::KILLED_BAD_MESSAGE, false); 512 ResultCodes::KILLED_BAD_MESSAGE, false);
512 } 513 }
513 } 514 }
514 515
515 Profile* ExtensionFunctionDispatcher::profile() { 516 Profile* ExtensionFunctionDispatcher::profile() {
516 return profile_; 517 return profile_;
517 } 518 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698