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

Side by Side Diff: content/renderer/manifest/manifest_manager.cc

Issue 896823002: [Manifest] Update a RenderFrame's Manifest when navigated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « content/renderer/manifest/manifest_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer/manifest/manifest_manager.h" 5 #include "content/renderer/manifest/manifest_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/nullable_string16.h" 8 #include "base/strings/nullable_string16.h"
9 #include "content/common/manifest_manager_messages.h" 9 #include "content/common/manifest_manager_messages.h"
10 #include "content/public/renderer/render_frame.h" 10 #include "content/public/renderer/render_frame.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return; 94 return;
95 95
96 FetchManifest(); 96 FetchManifest();
97 } 97 }
98 98
99 void ManifestManager::DidChangeManifest() { 99 void ManifestManager::DidChangeManifest() {
100 may_have_manifest_ = true; 100 may_have_manifest_ = true;
101 manifest_dirty_ = true; 101 manifest_dirty_ = true;
102 } 102 }
103 103
104 void ManifestManager::DidCommitProvisionalLoad(bool is_new_navigation) {
105 may_have_manifest_ = false;
106 manifest_dirty_ = true;
107 }
108
104 void ManifestManager::FetchManifest() { 109 void ManifestManager::FetchManifest() {
105 GURL url(render_frame()->GetWebFrame()->document().manifestURL()); 110 GURL url(render_frame()->GetWebFrame()->document().manifestURL());
106 111
107 if (url.is_empty()) { 112 if (url.is_empty()) {
108 ManifestUmaUtil::FetchFailed(ManifestUmaUtil::FETCH_EMPTY_URL); 113 ManifestUmaUtil::FetchFailed(ManifestUmaUtil::FETCH_EMPTY_URL);
109 ResolveCallbacks(ResolveStateFailure); 114 ResolveCallbacks(ResolveStateFailure);
110 return; 115 return;
111 } 116 }
112 117
113 fetcher_.reset(new ManifestFetcher(url)); 118 fetcher_.reset(new ManifestFetcher(url));
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 168
164 pending_callbacks_.clear(); 169 pending_callbacks_.clear();
165 170
166 for (std::list<GetManifestCallback>::const_iterator it = callbacks.begin(); 171 for (std::list<GetManifestCallback>::const_iterator it = callbacks.begin();
167 it != callbacks.end(); ++it) { 172 it != callbacks.end(); ++it) {
168 it->Run(manifest); 173 it->Run(manifest);
169 } 174 }
170 } 175 }
171 176
172 } // namespace content 177 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/manifest/manifest_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698