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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2578003002: Move |GetCanonicalEncodingNameByAliasName| to base/i18n (Closed)
Patch Set: Created 4 years 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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/debug/dump_without_crashing.h" 13 #include "base/debug/dump_without_crashing.h"
14 #include "base/feature_list.h" 14 #include "base/feature_list.h"
15 #include "base/i18n/character_encoding.h"
15 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
16 #include "base/location.h" 17 #include "base/location.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 #include "base/macros.h" 19 #include "base/macros.h"
19 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
20 #include "base/metrics/histogram_macros.h" 21 #include "base/metrics/histogram_macros.h"
21 #include "base/process/process.h" 22 #include "base/process/process.h"
22 #include "base/profiler/scoped_tracker.h" 23 #include "base/profiler/scoped_tracker.h"
23 #include "base/single_thread_task_runner.h" 24 #include "base/single_thread_task_runner.h"
24 #include "base/strings/string16.h" 25 #include "base/strings/string16.h"
(...skipping 5048 matching lines...) Expand 10 before | Expand all | Expand 10 after
5073 // Don't leak the sync IPC reply if the RFH or process is gone. 5074 // Don't leak the sync IPC reply if the RFH or process is gone.
5074 delete reply_msg; 5075 delete reply_msg;
5075 } 5076 }
5076 } 5077 }
5077 5078
5078 void WebContentsImpl::SetEncoding(const std::string& encoding) { 5079 void WebContentsImpl::SetEncoding(const std::string& encoding) {
5079 if (encoding == last_reported_encoding_) 5080 if (encoding == last_reported_encoding_)
5080 return; 5081 return;
5081 last_reported_encoding_ = encoding; 5082 last_reported_encoding_ = encoding;
5082 5083
5083 canonical_encoding_ = GetContentClient()->browser()-> 5084 canonical_encoding_ = base::GetCanonicalEncodingNameByAliasName(encoding);
5084 GetCanonicalEncodingNameByAliasName(encoding);
5085 } 5085 }
5086 5086
5087 bool WebContentsImpl::IsHidden() { 5087 bool WebContentsImpl::IsHidden() {
5088 return capturer_count_ == 0 && !should_normally_be_visible_; 5088 return capturer_count_ == 0 && !should_normally_be_visible_;
5089 } 5089 }
5090 5090
5091 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { 5091 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() {
5092 if (node_ && node_->outer_web_contents()) 5092 if (node_ && node_->outer_web_contents())
5093 return node_->outer_contents_frame_tree_node_id(); 5093 return node_->outer_contents_frame_tree_node_id();
5094 5094
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
5327 GetMainFrame()->AddMessageToConsole( 5327 GetMainFrame()->AddMessageToConsole(
5328 content::CONSOLE_MESSAGE_LEVEL_WARNING, 5328 content::CONSOLE_MESSAGE_LEVEL_WARNING,
5329 base::StringPrintf("This site does not have a valid SSL " 5329 base::StringPrintf("This site does not have a valid SSL "
5330 "certificate! Without SSL, your site's and " 5330 "certificate! Without SSL, your site's and "
5331 "visitors' data is vulnerable to theft and " 5331 "visitors' data is vulnerable to theft and "
5332 "tampering. Get a valid SSL certificate before" 5332 "tampering. Get a valid SSL certificate before"
5333 " releasing your website to the public.")); 5333 " releasing your website to the public."));
5334 } 5334 }
5335 5335
5336 } // namespace content 5336 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698