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

Side by Side Diff: content/browser/service_worker/service_worker_storage.cc

Issue 136573007: Quota: Factor out (Mock)QuotaManagerProxy into its own file for readability (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/service_worker/service_worker_storage.h" 5 #include "content/browser/service_worker/service_worker_storage.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "content/browser/service_worker/service_worker_registration.h" 10 #include "content/browser/service_worker/service_worker_registration.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "webkit/browser/quota/quota_manager.h" 12 #include "webkit/browser/quota/quota_manager_proxy.h"
13 13
14 namespace { 14 namespace {
15 // This is temporary until we figure out how registration ids will be 15 // This is temporary until we figure out how registration ids will be
16 // calculated. 16 // calculated.
17 int64 NextRegistrationId() { 17 int64 NextRegistrationId() {
18 static int64 worker_id = 0; 18 static int64 worker_id = 0;
19 return worker_id++; 19 return worker_id++;
20 } 20 }
21 } // namespace 21 } // namespace
22 22
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Temporarily borrowed directly from appcache::Namespace::IsMatch(). 131 // Temporarily borrowed directly from appcache::Namespace::IsMatch().
132 // We have to escape '?' characters since MatchPattern also treats those 132 // We have to escape '?' characters since MatchPattern also treats those
133 // as wildcards which we don't want here, we only do '*'s. 133 // as wildcards which we don't want here, we only do '*'s.
134 std::string pattern_spec(pattern.spec()); 134 std::string pattern_spec(pattern.spec());
135 if (pattern.has_query()) 135 if (pattern.has_query())
136 ReplaceSubstringsAfterOffset(&pattern_spec, 0, "?", "\\?"); 136 ReplaceSubstringsAfterOffset(&pattern_spec, 0, "?", "\\?");
137 return MatchPattern(url.spec(), pattern_spec); 137 return MatchPattern(url.spec(), pattern_spec);
138 } 138 }
139 139
140 } // namespace content 140 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_context_wrapper.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698