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

Side by Side Diff: chrome/browser/content_settings/host_content_settings_map.cc

Issue 9159053: Coverity: pass ContentSettingsPattern by const ref (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix MockObserver Created 8 years, 10 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/content_settings/host_content_settings_map.h ('k') | no next file » | 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/browser/content_settings/host_content_settings_map.h" 5 #include "chrome/browser/content_settings/host_content_settings_map.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 337 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
338 case CONTENT_SETTINGS_TYPE_INTENTS: 338 case CONTENT_SETTINGS_TYPE_INTENTS:
339 case CONTENT_SETTINGS_TYPE_MOUSELOCK: 339 case CONTENT_SETTINGS_TYPE_MOUSELOCK:
340 return setting == CONTENT_SETTING_ASK; 340 return setting == CONTENT_SETTING_ASK;
341 default: 341 default:
342 return false; 342 return false;
343 } 343 }
344 } 344 }
345 345
346 void HostContentSettingsMap::OnContentSettingChanged( 346 void HostContentSettingsMap::OnContentSettingChanged(
347 ContentSettingsPattern primary_pattern, 347 const ContentSettingsPattern& primary_pattern,
348 ContentSettingsPattern secondary_pattern, 348 const ContentSettingsPattern& secondary_pattern,
349 ContentSettingsType content_type, 349 ContentSettingsType content_type,
350 std::string resource_identifier) { 350 std::string resource_identifier) {
351 const ContentSettingsDetails details(primary_pattern, 351 const ContentSettingsDetails details(primary_pattern,
352 secondary_pattern, 352 secondary_pattern,
353 content_type, 353 content_type,
354 resource_identifier); 354 resource_identifier);
355 content::NotificationService::current()->Notify( 355 content::NotificationService::current()->Notify(
356 chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, 356 chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED,
357 content::Source<HostContentSettingsMap>(this), 357 content::Source<HostContentSettingsMap>(this),
358 content::Details<const ContentSettingsDetails>(&details)); 358 content::Details<const ContentSettingsDetails>(&details));
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 455 }
456 } 456 }
457 457
458 if (info) { 458 if (info) {
459 info->source = content_settings::SETTING_SOURCE_NONE; 459 info->source = content_settings::SETTING_SOURCE_NONE;
460 info->primary_pattern = ContentSettingsPattern(); 460 info->primary_pattern = ContentSettingsPattern();
461 info->secondary_pattern = ContentSettingsPattern(); 461 info->secondary_pattern = ContentSettingsPattern();
462 } 462 }
463 return NULL; 463 return NULL;
464 } 464 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/host_content_settings_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698