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

Side by Side Diff: chrome/renderer/translate/translate_helper.cc

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 6 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/translate/translate_helper.h" 5 #include "chrome/renderer/translate/translate_helper.h"
6 6
7 #if defined(CLD2_DYNAMIC_MODE) 7 #if defined(CLD2_DYNAMIC_MODE)
8 #include <stdint.h> 8 #include <stdint.h>
9 #endif 9 #endif
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // TODO(andrewhayden): Refactor translate_manager.cc's IsTranslatableURL to 119 // TODO(andrewhayden): Refactor translate_manager.cc's IsTranslatableURL to
120 // components/translate/core/common/translate_util.cc, and ignore any URL 120 // components/translate/core/common/translate_util.cc, and ignore any URL
121 // that fails that check. This will require moving unit tests and rewiring 121 // that fails that check. This will require moving unit tests and rewiring
122 // other function calls as well, so for now replicate the logic here. 122 // other function calls as well, so for now replicate the logic here.
123 if (url.is_empty()) 123 if (url.is_empty())
124 return; 124 return;
125 if (url.SchemeIs(content::kChromeUIScheme)) 125 if (url.SchemeIs(content::kChromeUIScheme))
126 return; 126 return;
127 if (url.SchemeIs(content::kChromeDevToolsScheme)) 127 if (url.SchemeIs(content::kChromeDevToolsScheme))
128 return; 128 return;
129 if (url.SchemeIs(content::kFtpScheme)) 129 if (url.SchemeIs(url::kFtpScheme))
130 return; 130 return;
131 #if defined(OS_CHROMEOS) 131 #if defined(OS_CHROMEOS)
132 if (url.SchemeIs(extensions::kExtensionScheme) && 132 if (url.SchemeIs(extensions::kExtensionScheme) &&
133 url.DomainIs(file_manager::kFileManagerAppId)) 133 url.DomainIs(file_manager::kFileManagerAppId))
134 return; 134 return;
135 #endif 135 #endif
136 136
137 // Start polling for CLD data. 137 // Start polling for CLD data.
138 cld2_data_file_polling_started_ = true; 138 cld2_data_file_polling_started_ = true;
139 TranslateHelper::SendCLD2DataFileRequest(0, 1000); 139 TranslateHelper::SendCLD2DataFileRequest(0, 1000);
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 s_cld_mmap_.Get().value = NULL; 677 s_cld_mmap_.Get().value = NULL;
678 return; 678 return;
679 } 679 }
680 680
681 // Initialize the CLD subsystem... and it's all done! 681 // Initialize the CLD subsystem... and it's all done!
682 const uint8* data_ptr = s_cld_mmap_.Get().value->data() + data_offset; 682 const uint8* data_ptr = s_cld_mmap_.Get().value->data() + data_offset;
683 CLD2::loadDataFromRawAddress(data_ptr, data_length); 683 CLD2::loadDataFromRawAddress(data_ptr, data_length);
684 DCHECK(CLD2::isDataLoaded()) << "Failed to load CLD data from mmap"; 684 DCHECK(CLD2::isDataLoaded()) << "Failed to load CLD data from mmap";
685 } 685 }
686 #endif 686 #endif
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | chrome/utility/importer/bookmark_html_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698