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

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

Issue 10909239: Rename PACKAGED_APP references to LEGACY_PACKAGED_APP (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 } 1618 }
1619 1619
1620 // Need to check this now and not on construction because otherwise it won't 1620 // Need to check this now and not on construction because otherwise it won't
1621 // work with browser_tests. 1621 // work with browser_tests.
1622 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 1622 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
1623 std::string allowed_list = 1623 std::string allowed_list =
1624 command_line.GetSwitchValueASCII(switches::kAllowNaClSocketAPI); 1624 command_line.GetSwitchValueASCII(switches::kAllowNaClSocketAPI);
1625 if (allowed_list == "*") { 1625 if (allowed_list == "*") {
1626 // The wildcard allows socket API only for packaged and platform apps. 1626 // The wildcard allows socket API only for packaged and platform apps.
1627 return extension && 1627 return extension &&
1628 (extension->GetType() == Extension::TYPE_PACKAGED_APP || 1628 (extension->GetType() == Extension::TYPE_LEGACY_PACKAGED_APP ||
1629 extension->GetType() == Extension::TYPE_PLATFORM_APP); 1629 extension->GetType() == Extension::TYPE_PLATFORM_APP);
1630 } else if (!allowed_list.empty()) { 1630 } else if (!allowed_list.empty()) {
1631 StringTokenizer t(allowed_list, ","); 1631 StringTokenizer t(allowed_list, ",");
1632 while (t.GetNext()) { 1632 while (t.GetNext()) {
1633 if (t.token() == host) 1633 if (t.token() == host)
1634 return true; 1634 return true;
1635 } 1635 }
1636 } 1636 }
1637 1637
1638 if (!extension) 1638 if (!extension)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 partition_id = extension->id(); 1714 partition_id = extension->id();
1715 } 1715 }
1716 1716
1717 // Enforce that IsValidStoragePartitionId() implementation stays in sync. 1717 // Enforce that IsValidStoragePartitionId() implementation stays in sync.
1718 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); 1718 DCHECK(IsValidStoragePartitionId(browser_context, partition_id));
1719 return partition_id; 1719 return partition_id;
1720 } 1720 }
1721 1721
1722 1722
1723 } // namespace chrome 1723 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/management/management_api.cc » ('j') | chrome/common/extensions/extension.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698