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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 12087091: Move string tokenizer to base/strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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/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 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 // work with browser_tests. 1916 // work with browser_tests.
1917 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 1917 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
1918 std::string allowed_list = 1918 std::string allowed_list =
1919 command_line.GetSwitchValueASCII(switches::kAllowNaClSocketAPI); 1919 command_line.GetSwitchValueASCII(switches::kAllowNaClSocketAPI);
1920 if (allowed_list == "*") { 1920 if (allowed_list == "*") {
1921 // The wildcard allows socket API only for packaged and platform apps. 1921 // The wildcard allows socket API only for packaged and platform apps.
1922 return extension && 1922 return extension &&
1923 (extension->GetType() == Manifest::TYPE_LEGACY_PACKAGED_APP || 1923 (extension->GetType() == Manifest::TYPE_LEGACY_PACKAGED_APP ||
1924 extension->GetType() == Manifest::TYPE_PLATFORM_APP); 1924 extension->GetType() == Manifest::TYPE_PLATFORM_APP);
1925 } else if (!allowed_list.empty()) { 1925 } else if (!allowed_list.empty()) {
1926 StringTokenizer t(allowed_list, ","); 1926 base::StringTokenizer t(allowed_list, ",");
1927 while (t.GetNext()) { 1927 while (t.GetNext()) {
1928 if (t.token() == host) 1928 if (t.token() == host)
1929 return true; 1929 return true;
1930 } 1930 }
1931 } 1931 }
1932 1932
1933 if (!extension) 1933 if (!extension)
1934 return false; 1934 return false;
1935 1935
1936 extensions::SocketPermission::CheckParam extension_params( 1936 extensions::SocketPermission::CheckParam extension_params(
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 io_thread_application_locale_ = locale; 2046 io_thread_application_locale_ = locale;
2047 } 2047 }
2048 2048
2049 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 2049 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
2050 const std::string& locale) { 2050 const std::string& locale) {
2051 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 2051 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2052 io_thread_application_locale_ = locale; 2052 io_thread_application_locale_ = locale;
2053 } 2053 }
2054 2054
2055 } // namespace chrome 2055 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698