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

Side by Side Diff: chrome/common/content_settings_pattern.cc

Issue 7885006: Moving ContentSettingsPattern from chrome/browser/content_settings to chrome/common. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. Created 9 years, 3 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/browser/content_settings/content_settings_pattern.h" 5 #include "chrome/common/content_settings_pattern.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "chrome/browser/content_settings/content_settings_pattern_parser.h" 12 #include "chrome/common/content_settings_pattern_parser.h"
13 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
14 #include "net/base/dns_util.h" 14 #include "net/base/dns_util.h"
15 #include "net/base/net_util.h" 15 #include "net/base/net_util.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "googleurl/src/url_canon.h" 17 #include "googleurl/src/url_canon.h"
18 18
19 namespace { 19 namespace {
20 20
21 std::string GetDefaultPort(const std::string& scheme) { 21 std::string GetDefaultPort(const std::string& scheme) {
22 if (scheme == chrome::kHttpScheme) 22 if (scheme == chrome::kHttpScheme)
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 if (!parts.is_port_wildcard && other_parts.is_port_wildcard) 601 if (!parts.is_port_wildcard && other_parts.is_port_wildcard)
602 return ContentSettingsPattern::PREDECESSOR; 602 return ContentSettingsPattern::PREDECESSOR;
603 603
604 int result = parts.port.compare(other_parts.port); 604 int result = parts.port.compare(other_parts.port);
605 if (result == 0) 605 if (result == 0)
606 return ContentSettingsPattern::IDENTITY; 606 return ContentSettingsPattern::IDENTITY;
607 if (result > 0) 607 if (result > 0)
608 return ContentSettingsPattern::DISJOINT_ORDER_PRE; 608 return ContentSettingsPattern::DISJOINT_ORDER_PRE;
609 return ContentSettingsPattern::DISJOINT_ORDER_POST; 609 return ContentSettingsPattern::DISJOINT_ORDER_POST;
610 } 610 }
OLDNEW
« no previous file with comments | « chrome/common/content_settings_pattern.h ('k') | chrome/common/content_settings_pattern_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698