OLD | NEW |
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/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/string_tokenizer.h" | 14 #include "base/strings/string_tokenizer.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/app/breakpad_mac.h" | 16 #include "chrome/app/breakpad_mac.h" |
17 #include "chrome/browser/browser_about_handler.h" | 17 #include "chrome/browser/browser_about_handler.h" |
18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 19 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
20 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 20 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
21 #include "chrome/browser/character_encoding.h" | 21 #include "chrome/browser/character_encoding.h" |
22 #include "chrome/browser/chrome_benchmarking_message_filter.h" | 22 #include "chrome/browser/chrome_benchmarking_message_filter.h" |
23 #include "chrome/browser/chrome_quota_permission_context.h" | 23 #include "chrome/browser/chrome_quota_permission_context.h" |
24 #include "chrome/browser/content_settings/content_settings_utils.h" | 24 #include "chrome/browser/content_settings/content_settings_utils.h" |
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 // work with browser_tests. | 1917 // work with browser_tests. |
1918 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1918 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
1919 std::string allowed_list = | 1919 std::string allowed_list = |
1920 command_line.GetSwitchValueASCII(switches::kAllowNaClSocketAPI); | 1920 command_line.GetSwitchValueASCII(switches::kAllowNaClSocketAPI); |
1921 if (allowed_list == "*") { | 1921 if (allowed_list == "*") { |
1922 // The wildcard allows socket API only for packaged and platform apps. | 1922 // The wildcard allows socket API only for packaged and platform apps. |
1923 return extension && | 1923 return extension && |
1924 (extension->GetType() == Manifest::TYPE_LEGACY_PACKAGED_APP || | 1924 (extension->GetType() == Manifest::TYPE_LEGACY_PACKAGED_APP || |
1925 extension->GetType() == Manifest::TYPE_PLATFORM_APP); | 1925 extension->GetType() == Manifest::TYPE_PLATFORM_APP); |
1926 } else if (!allowed_list.empty()) { | 1926 } else if (!allowed_list.empty()) { |
1927 StringTokenizer t(allowed_list, ","); | 1927 base::StringTokenizer t(allowed_list, ","); |
1928 while (t.GetNext()) { | 1928 while (t.GetNext()) { |
1929 if (t.token() == host) | 1929 if (t.token() == host) |
1930 return true; | 1930 return true; |
1931 } | 1931 } |
1932 } | 1932 } |
1933 | 1933 |
1934 if (!extension) | 1934 if (!extension) |
1935 return false; | 1935 return false; |
1936 | 1936 |
1937 extensions::SocketPermission::CheckParam extension_params( | 1937 extensions::SocketPermission::CheckParam extension_params( |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2052 io_thread_application_locale_ = locale; | 2052 io_thread_application_locale_ = locale; |
2053 } | 2053 } |
2054 | 2054 |
2055 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 2055 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
2056 const std::string& locale) { | 2056 const std::string& locale) { |
2057 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2057 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
2058 io_thread_application_locale_ = locale; | 2058 io_thread_application_locale_ = locale; |
2059 } | 2059 } |
2060 | 2060 |
2061 } // namespace chrome | 2061 } // namespace chrome |
OLD | NEW |