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

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

Issue 4687005: Track permissions granted to extensions in prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/logging.h"
5 #include "chrome/common/extensions/extension_extent.h" 6 #include "chrome/common/extensions/extension_extent.h"
6 7
7 #include "chrome/common/extensions/url_pattern.h" 8 #include "chrome/common/extensions/url_pattern.h"
8 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
9 10
10 ExtensionExtent::ExtensionExtent() { 11 ExtensionExtent::ExtensionExtent() {
11 } 12 }
12 13
13 ExtensionExtent::ExtensionExtent(const ExtensionExtent& rhs) 14 ExtensionExtent::ExtensionExtent(const ExtensionExtent& rhs)
14 : patterns_(rhs.patterns_) { 15 : patterns_(rhs.patterns_) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 i != patterns_.end(); ++i) { 52 i != patterns_.end(); ++i) {
52 for (PatternList::const_iterator j = other.patterns().begin(); 53 for (PatternList::const_iterator j = other.patterns().begin();
53 j != other.patterns().end(); ++j) { 54 j != other.patterns().end(); ++j) {
54 if (i->OverlapsWith(*j)) 55 if (i->OverlapsWith(*j))
55 return true; 56 return true;
56 } 57 }
57 } 58 }
58 59
59 return false; 60 return false;
60 } 61 }
62
63 void ExtensionExtent::GetAsStringSet(
Aaron Boodman 2010/11/12 00:05:24 It seems ugly somehow to pass these around as stri
jstritar 2010/11/19 21:38:36 Done. I now have an "AddPattern" helper method in
64 std::set<std::string>* string_patterns) const {
65 DCHECK(string_patterns);
66
67 for (PatternList::const_iterator i = patterns().begin();
68 i != patterns().end(); ++i)
69 string_patterns->insert(i->GetAsString());
70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698