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

Side by Side Diff: chrome/common/extensions/permissions/chrome_permission_message_provider.cc

Issue 201203006: Move basic API permissions code out of //chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/permissions/chrome_permission_message_provide r.h" 5 #include "chrome/common/extensions/permissions/chrome_permission_message_provide r.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/common/extensions/permissions/permission_message_util.h"
9 #include "extensions/common/extensions_client.h" 8 #include "extensions/common/extensions_client.h"
10 #include "extensions/common/permissions/permission_message.h" 9 #include "extensions/common/permissions/permission_message.h"
10 #include "extensions/common/permissions/permission_message_util.h"
11 #include "extensions/common/permissions/permission_set.h" 11 #include "extensions/common/permissions/permission_set.h"
12 #include "extensions/common/url_pattern_set.h" 12 #include "extensions/common/url_pattern_set.h"
13 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
14 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 namespace { 18 namespace {
19 19
20 PermissionMessages::iterator FindMessageByID(PermissionMessages& messages, 20 PermissionMessages::iterator FindMessageByID(PermissionMessages& messages,
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 std::set<std::string> old_hosts_set( 348 std::set<std::string> old_hosts_set(
349 permission_message_util::GetDistinctHosts(old_list, false, false)); 349 permission_message_util::GetDistinctHosts(old_list, false, false));
350 std::set<std::string> new_hosts_only = 350 std::set<std::string> new_hosts_only =
351 base::STLSetDifference<std::set<std::string> >(new_hosts_set, 351 base::STLSetDifference<std::set<std::string> >(new_hosts_set,
352 old_hosts_set); 352 old_hosts_set);
353 353
354 return !new_hosts_only.empty(); 354 return !new_hosts_only.empty();
355 } 355 }
356 356
357 } // namespace extensions 357 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698