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

Side by Side Diff: content/browser/appcache/manifest_parser.cc

Issue 344493002: Move all remaining appcache-related code to content namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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 // This is a port of ManifestParser.cc from WebKit/WebCore/loader/appcache. 5 // This is a port of ManifestParser.cc from WebKit/WebCore/loader/appcache.
6 6
7 /* 7 /*
8 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 8 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 11 matching lines...) Expand all
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #include "webkit/browser/appcache/manifest_parser.h" 32 #include "content/browser/appcache/manifest_parser.h"
33 33
34 #include "base/command_line.h" 34 #include "base/command_line.h"
35 #include "base/i18n/icu_string_conversions.h" 35 #include "base/i18n/icu_string_conversions.h"
36 #include "base/logging.h" 36 #include "base/logging.h"
37 #include "base/strings/utf_string_conversions.h" 37 #include "base/strings/utf_string_conversions.h"
38 #include "url/gurl.h" 38 #include "url/gurl.h"
39 39
40 namespace appcache { 40 namespace content {
41 41
42 namespace { 42 namespace {
43 43
44 // Helper function used to identify 'isPattern' annotations. 44 // Helper function used to identify 'isPattern' annotations.
45 bool HasPatternMatchingAnnotation(const wchar_t* line_p, 45 bool HasPatternMatchingAnnotation(const wchar_t* line_p,
46 const wchar_t* line_end) { 46 const wchar_t* line_end) {
47 // Skip whitespace separating the resource url from the annotation. 47 // Skip whitespace separating the resource url from the annotation.
48 // Note: trailing whitespace has already been trimmed from the line. 48 // Note: trailing whitespace has already been trimmed from the line.
49 while (line_p < line_end && (*line_p == '\t' || *line_p == ' ')) 49 while (line_p < line_end && (*line_p == '\t' || *line_p == ' '))
50 ++line_p; 50 ++line_p;
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 Namespace(APPCACHE_FALLBACK_NAMESPACE, namespace_url, 371 Namespace(APPCACHE_FALLBACK_NAMESPACE, namespace_url,
372 fallback_url, is_pattern)); 372 fallback_url, is_pattern));
373 } else { 373 } else {
374 NOTREACHED(); 374 NOTREACHED();
375 } 375 }
376 } 376 }
377 377
378 return true; 378 return true;
379 } 379 }
380 380
381 } // namespace appcache 381 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698