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

Side by Side Diff: content/common/android/address_parser.h

Issue 10456007: [Android] Split the address parser from AddressDetector for WebView use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: transforming AddressParser into a namespace. Created 8 years, 6 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
« no previous file with comments | « no previous file | content/common/android/address_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_ADDRESS_PARSER_H_
6 #define CONTENT_COMMON_ADDRESS_PARSER_H_
7 #pragma once
8
9 #include "base/string16.h"
10
11 namespace content {
12
13 // Provides methods to find a geographical address (currently US only)
14 // in a given text string.
15 namespace address_parser {
16
17 // Find the first address in some chunk of text. If an address is found in
18 // |text| true is returned and the address is copied into |address|.
19 // Otherwise, false is returned.
20 bool FindAddress(const string16& text, string16* address);
21
22 // Find the first address in some chunk of test. |begin| is the starting
23 // position to search from, |end| is the position to search to. |start_pos|
24 // and |end_pos| are set to the starting and ending position of the address,
25 // if found.
26 bool FindAddress(const string16::const_iterator& begin,
27 const string16::const_iterator& end,
28 size_t* start_pos,
29 size_t* end_pos);
30
31 } // namespace address_parser
32
33 } // namespace content
34
35 #endif // CONTENT_COMMON_ADDRESS_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/android/address_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698