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

Unified Diff: pdf/out_of_process_instance.cc

Issue 2857743005: Partial revert of r469453. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pdf/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index f9c2e98d15a00a9ec968876b90f3353a615960a4..8a597e51f813ab6c514f3d2adc3236aa2dc71329 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -21,7 +21,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/content_restriction.h"
-#include "chrome/common/url_constants.h"
#include "net/base/escape.h"
#include "pdf/pdf.h"
#include "ppapi/c/dev/ppb_cursor_control_dev.h"
@@ -49,6 +48,7 @@ namespace chrome_pdf {
namespace {
+const char kChromePrint[] = "chrome://print/";
const char kChromeExtension[] =
"chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai";
@@ -221,8 +221,8 @@ const PPP_Pdf ppp_private = {
int ExtractPrintPreviewPageIndex(base::StringPiece src_url) {
// Sample |src_url| format: chrome://print/id/page_index/print.pdf
std::vector<base::StringPiece> url_substr =
- base::SplitStringPiece(src_url.substr(strlen(chrome::kChromeUIPrintURL)),
- "/", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ base::SplitStringPiece(src_url.substr(strlen(kChromePrint)), "/",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (url_substr.size() != 3)
return -1;
@@ -236,7 +236,7 @@ int ExtractPrintPreviewPageIndex(base::StringPiece src_url) {
}
bool IsPrintPreviewUrl(base::StringPiece url) {
- return url.starts_with(chrome::kChromeUIPrintURL);
+ return url.starts_with(kChromePrint);
}
void ScalePoint(float scale, pp::Point* point) {
« no previous file with comments | « pdf/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698