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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 11312228: Move extension_error_utils.* and url_pattern_set.* into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hate Created 8 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 | Annotate | Revision Log
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/ui/webui/options/content_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 Profile* profile, AppFilter app_filter, ListValue* exceptions) { 187 Profile* profile, AppFilter app_filter, ListValue* exceptions) {
188 const ExtensionService* extension_service = profile->GetExtensionService(); 188 const ExtensionService* extension_service = profile->GetExtensionService();
189 // After ExtensionSystem::Init has been called at the browser's start, 189 // After ExtensionSystem::Init has been called at the browser's start,
190 // GetExtensionService() should not return NULL, so this is safe: 190 // GetExtensionService() should not return NULL, so this is safe:
191 const ExtensionSet* extensions = extension_service->extensions(); 191 const ExtensionSet* extensions = extension_service->extensions();
192 192
193 for (ExtensionSet::const_iterator extension = extensions->begin(); 193 for (ExtensionSet::const_iterator extension = extensions->begin();
194 extension != extensions->end(); ++extension) { 194 extension != extensions->end(); ++extension) {
195 if (!app_filter(**extension, profile)) continue; 195 if (!app_filter(**extension, profile)) continue;
196 196
197 URLPatternSet web_extent = (*extension)->web_extent(); 197 extensions::URLPatternSet web_extent = (*extension)->web_extent();
198 // Add patterns from web extent. 198 // Add patterns from web extent.
199 for (URLPatternSet::const_iterator pattern = web_extent.begin(); 199 for (extensions::URLPatternSet::const_iterator pattern = web_extent.begin();
200 pattern != web_extent.end(); ++pattern) { 200 pattern != web_extent.end(); ++pattern) {
201 std::string url_pattern = pattern->GetAsString(); 201 std::string url_pattern = pattern->GetAsString();
202 AddExceptionForHostedApp(url_pattern, **extension, exceptions); 202 AddExceptionForHostedApp(url_pattern, **extension, exceptions);
203 } 203 }
204 // Retrieve the launch URL. 204 // Retrieve the launch URL.
205 std::string launch_url_string = (*extension)->launch_web_url(); 205 std::string launch_url_string = (*extension)->launch_web_url();
206 GURL launch_url(launch_url_string); 206 GURL launch_url(launch_url_string);
207 // Skip adding the launch URL if it is part of the web extent. 207 // Skip adding the launch URL if it is part of the web extent.
208 if (web_extent.MatchesURL(launch_url)) continue; 208 if (web_extent.MatchesURL(launch_url)) continue;
209 AddExceptionForHostedApp(launch_url_string, **extension, exceptions); 209 AddExceptionForHostedApp(launch_url_string, **extension, exceptions);
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 for (size_t i = 0; i < arraysize(kExContentSettingsTypeGroupNames); ++i) { 1326 for (size_t i = 0; i < arraysize(kExContentSettingsTypeGroupNames); ++i) {
1327 if (type == kExContentSettingsTypeGroupNames[i].type) 1327 if (type == kExContentSettingsTypeGroupNames[i].type)
1328 return kExContentSettingsTypeGroupNames[i].name; 1328 return kExContentSettingsTypeGroupNames[i].name;
1329 } 1329 }
1330 1330
1331 NOTREACHED(); 1331 NOTREACHED();
1332 return std::string(); 1332 return std::string();
1333 } 1333 }
1334 1334
1335 } // namespace options 1335 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu_unittest.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698