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

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

Issue 6898026: Eliminate wstring from base/utf_offset_string_conversions.h, net/base/escape.h, and net/base/net_... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 return true; 549 return true;
550 if (a == "net") 550 if (a == "net")
551 return b != "com"; 551 return b != "com";
552 if (a == "org") 552 if (a == "org")
553 return b != "com" && b != "net"; 553 return b != "com" && b != "net";
554 return false; 554 return false;
555 } 555 }
556 556
557 // static 557 // static
558 std::vector<std::string> Extension::GetDistinctHosts( 558 std::vector<std::string> Extension::GetDistinctHosts(
559 const URLPatternList& host_patterns, bool include_rcd) { 559 const URLPatternList& host_patterns,
560 bool include_rcd) {
560 // Use a vector to preserve order (also faster than a map on small sets). 561 // Use a vector to preserve order (also faster than a map on small sets).
561 // Each item is a host split into two parts: host without RCDs and 562 // Each item is a host split into two parts: host without RCDs and
562 // current best RCD. 563 // current best RCD.
563 typedef std::vector<std::pair<std::string, std::string> > HostVector; 564 typedef std::vector<std::pair<std::string, std::string> > HostVector;
564 HostVector hosts_best_rcd; 565 HostVector hosts_best_rcd;
565 for (size_t i = 0; i < host_patterns.size(); ++i) { 566 for (size_t i = 0; i < host_patterns.size(); ++i) {
566 std::string host = host_patterns[i].host(); 567 std::string host = host_patterns[i].host();
567 568
568 // Add the subdomain wildcard back to the host, if necessary. 569 // Add the subdomain wildcard back to the host, if necessary.
569 if (host_patterns[i].match_subdomains()) 570 if (host_patterns[i].match_subdomains())
(...skipping 2379 matching lines...) Expand 10 before | Expand all | Expand 10 after
2949 2950
2950 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} 2951 UninstalledExtensionInfo::~UninstalledExtensionInfo() {}
2951 2952
2952 2953
2953 UnloadedExtensionInfo::UnloadedExtensionInfo( 2954 UnloadedExtensionInfo::UnloadedExtensionInfo(
2954 const Extension* extension, 2955 const Extension* extension,
2955 Reason reason) 2956 Reason reason)
2956 : reason(reason), 2957 : reason(reason),
2957 already_disabled(false), 2958 already_disabled(false),
2958 extension(extension) {} 2959 extension(extension) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698