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

Side by Side Diff: webkit/appcache/mock_appcache_storage_unittest.cc

Issue 1600002: Indicate in the tab UI if appcache creation was blocked by privacy settings. (Closed)
Patch Set: updates Created 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "webkit/appcache/appcache.h" 7 #include "webkit/appcache/appcache.h"
8 #include "webkit/appcache/appcache_group.h" 8 #include "webkit/appcache/appcache_group.h"
9 #include "webkit/appcache/appcache_response.h" 9 #include "webkit/appcache/appcache_response.h"
10 #include "webkit/appcache/appcache_storage.h" 10 #include "webkit/appcache/appcache_storage.h"
11 #include "webkit/appcache/mock_appcache_service.h" 11 #include "webkit/appcache/mock_appcache_service.h"
(...skipping 25 matching lines...) Expand all
37 stored_group_success_ = success; 37 stored_group_success_ = success;
38 } 38 }
39 39
40 void OnGroupMadeObsolete(AppCacheGroup* group, bool success) { 40 void OnGroupMadeObsolete(AppCacheGroup* group, bool success) {
41 obsoleted_group_ = group; 41 obsoleted_group_ = group;
42 obsoleted_success_ = success; 42 obsoleted_success_ = success;
43 } 43 }
44 44
45 void OnMainResponseFound(const GURL& url, const AppCacheEntry& entry, 45 void OnMainResponseFound(const GURL& url, const AppCacheEntry& entry,
46 const AppCacheEntry& fallback_entry, 46 const AppCacheEntry& fallback_entry,
47 int64 cache_id, const GURL& manifest_url) { 47 int64 cache_id, const GURL& manifest_url,
48 bool was_blocked_by_policy) {
48 found_url_ = url; 49 found_url_ = url;
49 found_entry_ = entry; 50 found_entry_ = entry;
50 found_fallback_entry_ = fallback_entry; 51 found_fallback_entry_ = fallback_entry;
51 found_cache_id_ = cache_id; 52 found_cache_id_ = cache_id;
52 found_manifest_url_ = manifest_url; 53 found_manifest_url_ = manifest_url;
53 } 54 }
54 55
55 scoped_refptr<AppCache> loaded_cache_; 56 scoped_refptr<AppCache> loaded_cache_;
56 int64 loaded_cache_id_; 57 int64 loaded_cache_id_;
57 scoped_refptr<AppCacheGroup> loaded_group_; 58 scoped_refptr<AppCacheGroup> loaded_group_;
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 EXPECT_TRUE(delegate.found_manifest_url_.is_empty()); 603 EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
603 EXPECT_EQ(kNoCacheId, delegate.found_cache_id_); 604 EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
604 EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id()); 605 EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id());
605 EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id()); 606 EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id());
606 EXPECT_EQ(0, delegate.found_entry_.types()); 607 EXPECT_EQ(0, delegate.found_entry_.types());
607 EXPECT_EQ(0, delegate.found_fallback_entry_.types()); 608 EXPECT_EQ(0, delegate.found_fallback_entry_.types());
608 } 609 }
609 610
610 } // namespace appcache 611 } // namespace appcache
611 612
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698