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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 1315303002: Dispatch DRP IPC call from renderer main thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 3 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 | « chrome/common/chrome_content_client.h ('k') | chrome/renderer/page_load_histograms.cc » ('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) 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/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #endif // defined(OS_LINUX) 9 #endif // defined(OS_LINUX)
10 10
(...skipping 12 matching lines...) Expand all
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "chrome/common/child_process_logging.h" 24 #include "chrome/common/child_process_logging.h"
25 #include "chrome/common/chrome_constants.h" 25 #include "chrome/common/chrome_constants.h"
26 #include "chrome/common/chrome_paths.h" 26 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/crash_keys.h" 28 #include "chrome/common/crash_keys.h"
29 #include "chrome/common/pepper_flash.h" 29 #include "chrome/common/pepper_flash.h"
30 #include "chrome/common/secure_origin_whitelist.h" 30 #include "chrome/common/secure_origin_whitelist.h"
31 #include "chrome/common/url_constants.h" 31 #include "chrome/common/url_constants.h"
32 #include "chrome/grit/common_resources.h" 32 #include "chrome/grit/common_resources.h"
33 #include "components/data_reduction_proxy/content/common/data_reduction_proxy_me ssages.h"
33 #include "components/dom_distiller/core/url_constants.h" 34 #include "components/dom_distiller/core/url_constants.h"
34 #include "components/version_info/version_info.h" 35 #include "components/version_info/version_info.h"
35 #include "content/public/common/content_constants.h" 36 #include "content/public/common/content_constants.h"
36 #include "content/public/common/content_switches.h" 37 #include "content/public/common/content_switches.h"
37 #include "content/public/common/url_constants.h" 38 #include "content/public/common/url_constants.h"
38 #include "content/public/common/user_agent.h" 39 #include "content/public/common/user_agent.h"
39 #include "extensions/common/constants.h" 40 #include "extensions/common/constants.h"
40 #include "gpu/config/gpu_info.h" 41 #include "gpu/config/gpu_info.h"
41 #include "net/http/http_util.h" 42 #include "net/http/http_util.h"
42 #include "ui/base/l10n/l10n_util.h" 43 #include "ui/base/l10n/l10n_util.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 std::vector<std::string>* savable_schemes) { 533 std::vector<std::string>* savable_schemes) {
533 for (int i = 0; i < kNumChromeStandardURLSchemes; i++) 534 for (int i = 0; i < kNumChromeStandardURLSchemes; i++)
534 standard_schemes->push_back(kChromeStandardURLSchemes[i]); 535 standard_schemes->push_back(kChromeStandardURLSchemes[i]);
535 536
536 savable_schemes->push_back(extensions::kExtensionScheme); 537 savable_schemes->push_back(extensions::kExtensionScheme);
537 savable_schemes->push_back(extensions::kExtensionResourceScheme); 538 savable_schemes->push_back(extensions::kExtensionResourceScheme);
538 savable_schemes->push_back(chrome::kChromeSearchScheme); 539 savable_schemes->push_back(chrome::kChromeSearchScheme);
539 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); 540 savable_schemes->push_back(dom_distiller::kDomDistillerScheme);
540 } 541 }
541 542
543 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) {
544 DCHECK(!content::ContentClient::CanSendWhileSwappedOut(message));
Charlie Reis 2015/09/02 17:35:05 You don't need this. ContentClient::CanSendWhileS
tbansal1 2015/09/02 17:38:47 Done.
545 return message->type() ==
546 DataReductionProxyViewHostMsg_DataReductionProxyStatus::ID;
547 }
548
542 std::string ChromeContentClient::GetProduct() const { 549 std::string ChromeContentClient::GetProduct() const {
543 return ::GetProduct(); 550 return ::GetProduct();
544 } 551 }
545 552
546 std::string ChromeContentClient::GetUserAgent() const { 553 std::string ChromeContentClient::GetUserAgent() const {
547 return ::GetUserAgent(); 554 return ::GetUserAgent();
548 } 555 }
549 556
550 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { 557 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const {
551 return l10n_util::GetStringUTF16(message_id); 558 return l10n_util::GetStringUTF16(message_id);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 schemes->insert(content::kChromeUIScheme); 610 schemes->insert(content::kChromeUIScheme);
604 schemes->insert(extensions::kExtensionScheme); 611 schemes->insert(extensions::kExtensionScheme);
605 schemes->insert(extensions::kExtensionResourceScheme); 612 schemes->insert(extensions::kExtensionResourceScheme);
606 GetSecureOriginWhitelist(origins); 613 GetSecureOriginWhitelist(origins);
607 } 614 }
608 615
609 void ChromeContentClient::AddServiceWorkerSchemes( 616 void ChromeContentClient::AddServiceWorkerSchemes(
610 std::set<std::string>* schemes) { 617 std::set<std::string>* schemes) {
611 schemes->insert(extensions::kExtensionScheme); 618 schemes->insert(extensions::kExtensionScheme);
612 } 619 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_content_client.h ('k') | chrome/renderer/page_load_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698