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

Side by Side Diff: content/browser/download/save_package.cc

Issue 8159006: Move kExtensionScheme from content to chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 2 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 | « chrome/renderer/extensions/chrome_v8_context_set.cc ('k') | content/common/url_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/download/save_package.h" 5 #include "content/browser/download/save_package.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 saved_main_directory_path_ = saved_main_directory_path_.Append( 1231 saved_main_directory_path_ = saved_main_directory_path_.Append(
1232 saved_main_file_path_.RemoveExtension().BaseName().value() + 1232 saved_main_file_path_.RemoveExtension().BaseName().value() +
1233 FILE_PATH_LITERAL("_files")); 1233 FILE_PATH_LITERAL("_files"));
1234 } 1234 }
1235 1235
1236 Init(); 1236 Init();
1237 } 1237 }
1238 1238
1239 // Static 1239 // Static
1240 bool SavePackage::IsSavableURL(const GURL& url) { 1240 bool SavePackage::IsSavableURL(const GURL& url) {
1241 for (int i = 0; chrome::kSavableSchemes[i] != NULL; ++i) { 1241 for (int i = 0; chrome::GetSavableSchemes()[i] != NULL; ++i) {
1242 if (url.SchemeIs(chrome::kSavableSchemes[i])) { 1242 if (url.SchemeIs(chrome::GetSavableSchemes()[i])) {
1243 return true; 1243 return true;
1244 } 1244 }
1245 } 1245 }
1246 return false; 1246 return false;
1247 } 1247 }
1248 1248
1249 // Static 1249 // Static
1250 bool SavePackage::IsSavableContents(const std::string& contents_mime_type) { 1250 bool SavePackage::IsSavableContents(const std::string& contents_mime_type) {
1251 // WebKit creates Document object when MIME type is application/xhtml+xml, 1251 // WebKit creates Document object when MIME type is application/xhtml+xml,
1252 // so we also support this MIME type. 1252 // so we also support this MIME type.
(...skipping 24 matching lines...) Expand all
1277 StopObservation(); 1277 StopObservation();
1278 } 1278 }
1279 1279
1280 void SavePackage::FinalizeDownloadEntry() { 1280 void SavePackage::FinalizeDownloadEntry() {
1281 DCHECK(download_); 1281 DCHECK(download_);
1282 DCHECK(download_manager_); 1282 DCHECK(download_manager_);
1283 1283
1284 download_manager_->SavePageDownloadFinished(download_); 1284 download_manager_->SavePageDownloadFinished(download_);
1285 StopObservation(); 1285 StopObservation();
1286 } 1286 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_context_set.cc ('k') | content/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698